summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evlist.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-11 23:56:53 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-22 22:56:28 +0100
commit361c99a661a78ed22264649440e87fe4fe8da1f2 (patch)
treea60bc86f132608f2d41c800760b41f6f54f8e7af /tools/perf/util/evlist.h
parentperf tools: Fix time function double declaration with glibc (diff)
downloadlinux-361c99a661a78ed22264649440e87fe4fe8da1f2.tar.xz
linux-361c99a661a78ed22264649440e87fe4fe8da1f2.zip
perf evsel: Introduce perf_evlist
Killing two more perf wide global variables: nr_counters and evsel_list as a list_head. There are more operations that will need more fields in perf_evlist, like the pollfd for polling all the fds in a list of evsel instances. Use option->value to pass the evsel_list to parse_{events,filters}. LKML-Reference: <new-submission> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.h')
-rw-r--r--tools/perf/util/evlist.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
new file mode 100644
index 000000000000..48db91a8abf3
--- /dev/null
+++ b/tools/perf/util/evlist.h
@@ -0,0 +1,19 @@
+#ifndef __PERF_EVLIST_H
+#define __PERF_EVLIST_H 1
+
+#include <linux/list.h>
+
+struct perf_evlist {
+ struct list_head entries;
+ int nr_entries;
+};
+
+struct perf_evsel;
+
+struct perf_evlist *perf_evlist__new(void);
+void perf_evlist__delete(struct perf_evlist *evlist);
+
+void perf_evlist__add(struct perf_evlist *evlist, struct perf_evsel *entry);
+int perf_evlist__add_default(struct perf_evlist *evlist);
+
+#endif /* __PERF_EVLIST_H */