path: root/tools/perf/util/top.h
diff options
authorArnaldo Carvalho de Melo <>2011-11-25 08:19:45 -0200
committerArnaldo Carvalho de Melo <>2011-11-28 10:38:56 -0200
commitd20deb64e0490ee9442b5181bc08a62d2cadcb90 (patch)
treeafdb3f6fc9abbce9d0a96b7049d1f8121178a356 /tools/perf/util/top.h
parent7009cc34b964939815160d7de64cf0215cdbf8bb (diff)
perf tools: Pass tool context in the the perf_event_ops functions
So that we don't need to have that many globals. Next steps will remove the 'session' pointer, that in most cases is not needed. Then we can rename perf_event_ops to 'perf_tool' that better describes this class hierarchy. Cc: David Ahern <> Cc: Frederic Weisbecker <> Cc: Mike Galbraith <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Cc: Stephane Eranian <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/util/top.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
index 399650967958..44eda6fc6b33 100644
--- a/tools/perf/util/top.h
+++ b/tools/perf/util/top.h
@@ -2,14 +2,15 @@
#define __PERF_TOP_H 1
#include "types.h"
+#include "session.h"
#include "../perf.h"
#include <stddef.h>
struct perf_evlist;
struct perf_evsel;
-struct perf_session;
struct perf_top {
+ struct perf_event_ops ops;
struct perf_evlist *evlist;
* Symbols will be added here in perf_event__process_sample and will