perf intel-tpebs: Filter non-workload samples
authorIan Rogers <irogers@google.com>
Wed, 30 Apr 2025 20:01:08 +0000 (13:01 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 16 May 2025 14:31:10 +0000 (11:31 -0300)
commitbcfab08db7fb38bf292838f2b693233fb4f486eb
tree72de861c1f7e41bcc8843f80d6c55ebee55cc97b
parent1c5721ca89a1c8ae71082d3a102b39fd1ec0a205
perf intel-tpebs: Filter non-workload samples

If perf is running with a benchmark then we want the retirement
latency samples associated with the benchmark rather than from the
system as a whole.

Use the workload's PID to filter out samples that aren't from the
workload or its children.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Weilin Wang <weilin.wang@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250430200108.243234-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-tpebs.c