Messages in this thread Patch in this message | | | From | Jiri Olsa <> | Subject | [PATCH 15/26] perf tools: Introduce perf_hpp_list__init function | Date | Mon, 18 Jan 2016 10:24:13 +0100 |
| |
Introducing perf_hpp_list__init function to have an easy way to initialize perf_hpp_list struct.
Link: http://lkml.kernel.org/n/tip-6ucnvu4gdd1rl9rsojgn6t1f@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/util/hist.c | 6 ++++++ tools/perf/util/hist.h | 2 ++ 2 files changed, 8 insertions(+)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index a94067c8f753..c80f01460e3b 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -1658,3 +1658,9 @@ int hists__init(void) return err; } + +void perf_hpp_list__init(struct perf_hpp_list *list) +{ + INIT_LIST_HEAD(&list->list); + INIT_LIST_HEAD(&list->sort_list); +} diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index a9c8ccfcc284..ea50a9cf2316 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -386,4 +386,6 @@ int parse_filter_percentage(const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused); int perf_hist_config(const char *var, const char *value); +void perf_hpp_list__init(struct perf_hpp_list *list); + #endif /* __PERF_HIST_H */ -- 2.4.3
| |