diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index ff404750d7447b4d64037eb1d33bf27c9b616f61..7f2b5551386396d9963df091cd0ff1fdee17f020 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -1064,6 +1064,8 @@ static int read_events(struct perf_kvm_stat *kvm) return -EINVAL; } + symbol__init(); + if (!perf_session__has_traces(kvm->session, "kvm record")) return -EINVAL; @@ -1193,8 +1195,6 @@ kvm_events_report(struct perf_kvm_stat *kvm, int argc, const char **argv) NULL }; - symbol__init(); - if (argc) { argc = parse_options(argc, argv, kvm_events_report_options,