diff options
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 98125319b158..6de6f89c2a61 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -277,7 +277,7 @@ static int __add_event(struct list_head *list, int *idx, | |||
277 | 277 | ||
278 | event_attr_init(attr); | 278 | event_attr_init(attr); |
279 | 279 | ||
280 | evsel = perf_evsel__new(attr, (*idx)++); | 280 | evsel = perf_evsel__new_idx(attr, (*idx)++); |
281 | if (!evsel) | 281 | if (!evsel) |
282 | return -ENOMEM; | 282 | return -ENOMEM; |
283 | 283 | ||
@@ -378,7 +378,7 @@ static int add_tracepoint(struct list_head *list, int *idx, | |||
378 | { | 378 | { |
379 | struct perf_evsel *evsel; | 379 | struct perf_evsel *evsel; |
380 | 380 | ||
381 | evsel = perf_evsel__newtp(sys_name, evt_name, (*idx)++); | 381 | evsel = perf_evsel__newtp_idx(sys_name, evt_name, (*idx)++); |
382 | if (!evsel) | 382 | if (!evsel) |
383 | return -ENOMEM; | 383 | return -ENOMEM; |
384 | 384 | ||
@@ -998,8 +998,10 @@ void print_tracepoint_events(const char *subsys_glob, const char *event_glob, | |||
998 | char evt_path[MAXPATHLEN]; | 998 | char evt_path[MAXPATHLEN]; |
999 | char dir_path[MAXPATHLEN]; | 999 | char dir_path[MAXPATHLEN]; |
1000 | 1000 | ||
1001 | if (debugfs_valid_mountpoint(tracing_events_path)) | 1001 | if (debugfs_valid_mountpoint(tracing_events_path)) { |
1002 | printf(" [ Tracepoints not available: %s ]\n", strerror(errno)); | ||
1002 | return; | 1003 | return; |
1004 | } | ||
1003 | 1005 | ||
1004 | sys_dir = opendir(tracing_events_path); | 1006 | sys_dir = opendir(tracing_events_path); |
1005 | if (!sys_dir) | 1007 | if (!sys_dir) |
@@ -1095,7 +1097,7 @@ static bool is_event_supported(u8 type, unsigned config) | |||
1095 | .threads = { 0 }, | 1097 | .threads = { 0 }, |
1096 | }; | 1098 | }; |
1097 | 1099 | ||
1098 | evsel = perf_evsel__new(&attr, 0); | 1100 | evsel = perf_evsel__new(&attr); |
1099 | if (evsel) { | 1101 | if (evsel) { |
1100 | ret = perf_evsel__open(evsel, NULL, &tmap.map) >= 0; | 1102 | ret = perf_evsel__open(evsel, NULL, &tmap.map) >= 0; |
1101 | perf_evsel__delete(evsel); | 1103 | perf_evsel__delete(evsel); |