[PATCH 15/26] perf tools: Introduce perf_hpp_list__init function
From: Jiri Olsa
Date: Mon Jan 18 2016 - 04:28:08 EST
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@xxxxxxxxxxxxxx
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
---
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