diff options
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r-- | tools/perf/builtin-timechart.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 41c9bde..c2e0231 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -36,7 +36,6 @@ #include "util/session.h" #include "util/svghelper.h" #include "util/tool.h" -#include "util/data.h" #define SUPPORT_OLD_POWER_EVENTS 1 #define PWR_EVENT_EXIT -1 @@ -483,8 +482,8 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused, if (sample->cpu > numcpus) numcpus = sample->cpu; - if (evsel->handler != NULL) { - tracepoint_handler f = evsel->handler; + if (evsel->handler.func != NULL) { + tracepoint_handler f = evsel->handler.func; return f(evsel, sample); } @@ -991,13 +990,8 @@ static int __cmd_timechart(const char *output_name) { "power:power_frequency", process_sample_power_frequency }, #endif }; - struct perf_data_file file = { - .path = input_name, - .mode = PERF_DATA_MODE_READ, - }; - - struct perf_session *session = perf_session__new(&file, false, - &perf_timechart); + struct perf_session *session = perf_session__new(input_name, O_RDONLY, + 0, false, &perf_timechart); int ret = -EINVAL; if (session == NULL) |