]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - tools/perf/builtin-report.c
perf machine: Protect the machine->threads with a rwlock
[mirror_ubuntu-jammy-kernel.git] / tools / perf / builtin-report.c
index 18cb0ff39b4ed0bf9e88fe1396fbab73594b659a..8d5118f5ceddec40a5c911dfd5563d4df3a10a73 100644 (file)
@@ -142,7 +142,7 @@ static int process_sample_event(struct perf_tool *tool,
                .hide_unresolved = rep->hide_unresolved,
                .add_entry_cb = hist_iter__report_callback,
        };
-       int ret;
+       int ret = 0;
 
        if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
                pr_debug("problem processing %d event, skipping it.\n",
@@ -151,10 +151,10 @@ static int process_sample_event(struct perf_tool *tool,
        }
 
        if (rep->hide_unresolved && al.sym == NULL)
-               return 0;
+               goto out_put;
 
        if (rep->cpu_list && !test_bit(sample->cpu, rep->cpu_bitmap))
-               return 0;
+               goto out_put;
 
        if (sort__mode == SORT_MODE__BRANCH)
                iter.ops = &hist_iter_branch;
@@ -172,7 +172,8 @@ static int process_sample_event(struct perf_tool *tool,
                                   rep);
        if (ret < 0)
                pr_debug("problem adding hist entry, skipping event\n");
-
+out_put:
+       addr_location__put(&al);
        return ret;
 }