diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index bd31380122f96cdbabcba5451f2e246cef559802..7912feb9a0245c8fc3ecad51c652a6ff4a4d9387 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1861,7 +1861,8 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) else symbol_conf.use_callchain = false; - if (pevent_set_function_resolver(session->tevent.pevent, + if (session->tevent.pevent && + pevent_set_function_resolver(session->tevent.pevent, machine__resolve_kernel_addr, &session->machines.host) < 0) { pr_err("%s: failed to set libtraceevent function resolver\n", __func__);