mirror of https://gitee.com/openkylin/linux.git
perf hists: Add perf_hpp_list register helpers
Adding 2 perf_hpp_list register helpers: perf_hpp_list__column_register() perf_hpp_list__register_sort_field() to be called within existing helpers: perf_hpp__column_register() perf_hpp__register_sort_field() to register format entries within global perf_hpp_list object. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1453109064-1026-17-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
94b3dc3865
commit
ebdd98e030
|
@ -505,9 +505,16 @@ void perf_hpp__init(void)
|
|||
hpp_dimension__add_output(PERF_HPP__PERIOD);
|
||||
}
|
||||
|
||||
void perf_hpp__column_register(struct perf_hpp_fmt *format)
|
||||
void perf_hpp_list__column_register(struct perf_hpp_list *list,
|
||||
struct perf_hpp_fmt *format)
|
||||
{
|
||||
list_add_tail(&format->list, &perf_hpp_list.fields);
|
||||
list_add_tail(&format->list, &list->fields);
|
||||
}
|
||||
|
||||
void perf_hpp_list__register_sort_field(struct perf_hpp_list *list,
|
||||
struct perf_hpp_fmt *format)
|
||||
{
|
||||
list_add_tail(&format->sort_list, &list->sorts);
|
||||
}
|
||||
|
||||
void perf_hpp__column_unregister(struct perf_hpp_fmt *format)
|
||||
|
@ -515,11 +522,6 @@ void perf_hpp__column_unregister(struct perf_hpp_fmt *format)
|
|||
list_del(&format->list);
|
||||
}
|
||||
|
||||
void perf_hpp__register_sort_field(struct perf_hpp_fmt *format)
|
||||
{
|
||||
list_add_tail(&format->sort_list, &perf_hpp_list.sorts);
|
||||
}
|
||||
|
||||
void perf_hpp__cancel_cumulate(void)
|
||||
{
|
||||
struct perf_hpp_fmt *fmt, *acc, *ovh, *tmp;
|
||||
|
|
|
@ -233,6 +233,21 @@ struct perf_hpp_list {
|
|||
|
||||
extern struct perf_hpp_list perf_hpp_list;
|
||||
|
||||
void perf_hpp_list__column_register(struct perf_hpp_list *list,
|
||||
struct perf_hpp_fmt *format);
|
||||
void perf_hpp_list__register_sort_field(struct perf_hpp_list *list,
|
||||
struct perf_hpp_fmt *format);
|
||||
|
||||
static inline void perf_hpp__column_register(struct perf_hpp_fmt *format)
|
||||
{
|
||||
perf_hpp_list__column_register(&perf_hpp_list, format);
|
||||
}
|
||||
|
||||
static inline void perf_hpp__register_sort_field(struct perf_hpp_fmt *format)
|
||||
{
|
||||
perf_hpp_list__register_sort_field(&perf_hpp_list, format);
|
||||
}
|
||||
|
||||
#define perf_hpp__for_each_format(format) \
|
||||
list_for_each_entry(format, &perf_hpp_list.fields, list)
|
||||
|
||||
|
@ -262,11 +277,8 @@ enum {
|
|||
};
|
||||
|
||||
void perf_hpp__init(void);
|
||||
void perf_hpp__column_register(struct perf_hpp_fmt *format);
|
||||
void perf_hpp__column_unregister(struct perf_hpp_fmt *format);
|
||||
void perf_hpp__cancel_cumulate(void);
|
||||
|
||||
void perf_hpp__register_sort_field(struct perf_hpp_fmt *format);
|
||||
void perf_hpp__setup_output_field(void);
|
||||
void perf_hpp__reset_output_field(void);
|
||||
void perf_hpp__append_sort_keys(void);
|
||||
|
|
Loading…
Reference in New Issue