linux-yocto/kernel/events
Peter Zijlstra (Intel) e1c3bfe365 perf: Avoid the read if the count is already updated
[ Upstream commit 8ce939a0fa194939cc1f92dbd8bc1a7806e7d40a ]

The event may have been updated in the PMU-specific implementation,
e.g., Intel PEBS counters snapshotting. The common code should not
read and overwrite the value.

The PERF_SAMPLE_READ in the data->sample_type can be used to detect
whether the PMU-specific value is available. If yes, avoid the
pmu->read() in the common code. Add a new flag, skip_read, to track the
case.

Factor out a perf_pmu_read() to clean up the code.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250121152303.3128733-3-kan.liang@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:16 +02:00
..
callchain.c
core.c perf: Avoid the read if the count is already updated 2025-06-04 14:40:16 +02:00
hw_breakpoint_test.c
hw_breakpoint.c perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type 2025-06-04 14:40:09 +02:00
internal.h perf/aux: Fix AUX buffer serialization 2024-09-12 11:10:27 +02:00
Makefile
ring_buffer.c perf: Avoid the read if the count is already updated 2025-06-04 14:40:16 +02:00
uprobes.c uprobes: Fix race in uprobe_free_utask 2025-03-13 12:53:24 +01:00