linux-stable/tools/lib/perf
Ben Gainey 80c281fca2 tools/perf: Correctly calculate sample period for inherited SAMPLE_READ values
Sample period calculation in deliver_sample_value is updated to
calculate the per-thread period delta for events that are inherit +
PERF_SAMPLE_READ. When the sampling event has this configuration, the
read_format.id is used with the tid from the sample to lookup the
storage of the previously accumulated counter total before calculating
the delta. All existing valid configurations where read_format.value
represents some global value continue to use just the read_format.id to
locate the storage of the previously accumulated total.

perf_sample_id is modified to support tracking per-thread
values, along with the existing global per-id values. In the
per-thread case, values are stored in a hash by tid within the
perf_sample_id, and are dynamically allocated as the number is not known
ahead of time.

Signed-off-by: Ben Gainey <ben.gainey@arm.com>
Cc: james.clark@arm.com
Link: https://lore.kernel.org/r/20241001121505.1009685-2-ben.gainey@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2024-10-02 14:58:03 -07:00
..
Documentation libperf: Explicitly specify install-html dependencies 2024-09-26 15:45:48 -07:00
include tools/perf: Correctly calculate sample period for inherited SAMPLE_READ values 2024-10-02 14:58:03 -07:00
tests libperf cpumap: Replace usage of perf_cpu_map__new(NULL) with perf_cpu_map__new_online_cpus() 2023-12-12 14:55:13 -03:00
.gitignore libperf: Add gitignore 2024-08-01 12:11:33 -03:00
Build libperf: Change tests to single static and shared binaries 2021-07-07 11:41:58 -03:00
core.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
cpumap.c libperf cpumap: Ensure empty cpumap is NULL from alloc 2024-03-21 10:41:28 -03:00
evlist.c libperf evlist: Avoid out-of-bounds access 2024-02-29 13:57:02 -08:00
evsel.c tools/perf: Correctly calculate sample period for inherited SAMPLE_READ values 2024-10-02 14:58:03 -07:00
internal.h libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
lib.c libperf: Add preadn() 2022-05-23 10:11:12 -03:00
libperf.map libperf cpumap: Add any, empty and min helpers 2024-03-21 10:41:28 -03:00
libperf.pc.template libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
Makefile perf cpumap: Add reference count checking 2023-04-17 16:50:02 -03:00
mmap.c perf record: Fix comment misspellings 2024-04-26 22:13:10 -03:00
threadmap.c libperf: Add API for allocating new thread map array 2022-02-23 14:40:23 -03:00
xyarray.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00