summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-07-21 13:24:22 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-07-29 23:34:44 +0200
commitb27c4ece725a7f2225f76ad05dc6f3f5463fe893 (patch)
treeb72482e46a1129688dd4c9f515a863eede59dba8 /tools/perf/util/evsel.h
parentlibperf: Add perf_evlist and perf_evsel structs (diff)
downloadlinux-b27c4ece725a7f2225f76ad05dc6f3f5463fe893.tar.xz
linux-b27c4ece725a7f2225f76ad05dc6f3f5463fe893.zip
libperf: Include perf_evsel in evsel object
Including perf_evsel in evsel object, will continue to move other generic things into libperf's perf_evsel struct. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Budankov <alexey.budankov@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190721112506.12306-36-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 5fec1ca64f58..d74cac6fe306 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <linux/perf_event.h>
#include <linux/types.h>
+#include <internal/evsel.h>
#include "xyarray.h"
#include "symbol_conf.h"
#include "cpumap.h"
@@ -87,8 +88,7 @@ struct bpf_object;
/** struct evsel - event selector
*
* @evlist - evlist this evsel is in, if it is in one.
- * @node - To insert it into evlist->entries or in other list_heads, say in
- * the event parsing routines.
+ * @core - libperf evsel object
* @name - Can be set to retain the original event name passed by the user,
* so that when showing results in tools such as 'perf stat', we
* show the name used, not some alias.
@@ -101,7 +101,7 @@ struct bpf_object;
* @priv: And what is in its containing unnamed union are tool specific
*/
struct evsel {
- struct list_head node;
+ struct perf_evsel core;
struct evlist *evlist;
struct perf_event_attr attr;
char *filter;
@@ -386,12 +386,12 @@ int perf_evsel__parse_sample_timestamp(struct evsel *evsel,
static inline struct evsel *perf_evsel__next(struct evsel *evsel)
{
- return list_entry(evsel->node.next, struct evsel, node);
+ return list_entry(evsel->core.node.next, struct evsel, core.node);
}
static inline struct evsel *perf_evsel__prev(struct evsel *evsel)
{
- return list_entry(evsel->node.prev, struct evsel, node);
+ return list_entry(evsel->core.node.prev, struct evsel, core.node);
}
/**
@@ -478,15 +478,15 @@ static inline int perf_evsel__group_idx(struct evsel *evsel)
/* Iterates group WITHOUT the leader. */
#define for_each_group_member(_evsel, _leader) \
-for ((_evsel) = list_entry((_leader)->node.next, struct evsel, node); \
+for ((_evsel) = list_entry((_leader)->core.node.next, struct evsel, core.node); \
(_evsel) && (_evsel)->leader == (_leader); \
- (_evsel) = list_entry((_evsel)->node.next, struct evsel, node))
+ (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
/* Iterates group WITH the leader. */
#define for_each_group_evsel(_evsel, _leader) \
for ((_evsel) = _leader; \
(_evsel) && (_evsel)->leader == (_leader); \
- (_evsel) = list_entry((_evsel)->node.next, struct evsel, node))
+ (_evsel) = list_entry((_evsel)->core.node.next, struct evsel, core.node))
static inline bool perf_evsel__has_branch_callstack(const struct evsel *evsel)
{