summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/ordered-events.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2014-06-10 22:47:40 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-08-12 17:02:59 +0200
commit36522f5cf2ad280c971557e04120d52f9330ed36 (patch)
tree6f63079523d8129704a325e2466c80ab2b8063af /tools/perf/util/ordered-events.c
parentperf tools: Use list_move in ordered_events_delete function (diff)
downloadlinux-36522f5cf2ad280c971557e04120d52f9330ed36.tar.xz
linux-36522f5cf2ad280c971557e04120d52f9330ed36.zip
perf tools: Add ordered_events__init function
Adding ordered_events__init function for struct ordered_events struct initialization. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: David Ahern <dsahern@gmail.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-g6dx35hed8g14eh1ygx4uzp6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ordered-events.c')
-rw-r--r--tools/perf/util/ordered-events.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index be6a48ce3eea..7b8923e12dc7 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -193,3 +193,12 @@ int ordered_events__flush(struct perf_session *s, struct perf_tool *tool,
return err;
}
+
+void ordered_events__init(struct ordered_events *oe)
+{
+ INIT_LIST_HEAD(&oe->events);
+ INIT_LIST_HEAD(&oe->cache);
+ INIT_LIST_HEAD(&oe->to_free);
+ oe->max_alloc_size = (u64) -1;
+ oe->cur_alloc_size = 0;
+}