Doing a `perf sched record` then `perf sched stats report` crashes as
the tp_handler isn't set. Add a dummy tp_handler for it rather than
adding an extra check.
Reported-by: Ian Rogers <irogers@google.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
.switch_event = replay_switch_event,
.fork_event = replay_fork_event,
};
+ struct trace_sched_handler stats_ops = {};
int ret;
perf_tool__init(&sched.tool, /*ordered_events=*/true);
} else if (!strcmp(argv[0], "stats")) {
const char *const stats_subcommands[] = {"record", "report", NULL};
+ sched.tp_handler = &stats_ops;
argc = parse_options_subcommand(argc, argv, stats_options,
stats_subcommands,
stats_usage,