summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2021-08-11 13:10:32 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-08-11 15:33:59 +0300
commit29159727aa7ed3341dc560e9983e7284f4279ade (patch)
treeac68243eb95d87a8409c83d3e7254c71e24cb485 /tools/perf/builtin-script.c
parent988db17932a78d201e826af3df7e89494ee0c037 (diff)
downloadlinux-29159727aa7ed3341dc560e9983e7284f4279ade.tar.xz
perf script: Fix unnecessary machine_resolve()
machine_resolve() may have already been called. Test for that to avoid calling it again unnecessarily. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: https //lore.kernel.org/r/20210811101036.17986-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r--tools/perf/builtin-script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index e2e165b53499..f469354155f1 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2212,7 +2212,7 @@ static int process_sample_event(struct perf_tool *tool,
if (filter_cpu(sample))
goto out_put;
- if (machine__resolve(machine, &al, sample) < 0) {
+ if (!al.thread && machine__resolve(machine, &al, sample) < 0) {
pr_err("problem processing %d event, skipping it.\n",
event->header.type);
ret = -1;