aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/evsel.h')
-rw-r--r--tools/perf/util/evsel.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 64ec8e1a7a28..f5029653dcd7 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -96,8 +96,19 @@ struct thread_map;
96struct perf_evlist; 96struct perf_evlist;
97struct perf_record_opts; 97struct perf_record_opts;
98 98
99struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx); 99struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx);
100struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name, int idx); 100
101static inline struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr)
102{
103 return perf_evsel__new_idx(attr, 0);
104}
105
106struct perf_evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx);
107
108static inline struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name)
109{
110 return perf_evsel__newtp_idx(sys, name, 0);
111}
101 112
102struct event_format *event_format__new(const char *sys, const char *name); 113struct event_format *event_format__new(const char *sys, const char *name);
103 114
@@ -307,8 +318,7 @@ int perf_evsel__fprintf(struct perf_evsel *evsel,
307 318
308bool perf_evsel__fallback(struct perf_evsel *evsel, int err, 319bool perf_evsel__fallback(struct perf_evsel *evsel, int err,
309 char *msg, size_t msgsize); 320 char *msg, size_t msgsize);
310int perf_evsel__open_strerror(struct perf_evsel *evsel, 321int perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,
311 struct perf_target *target,
312 int err, char *msg, size_t size); 322 int err, char *msg, size_t size);
313 323
314static inline int perf_evsel__group_idx(struct perf_evsel *evsel) 324static inline int perf_evsel__group_idx(struct perf_evsel *evsel)