Files
linux-stable-mirror/include/linux
Peter Zijlstra (Intel) 887e39ac47 perf: Avoid the read if the count is already updated
[ Upstream commit 8ce939a0fa ]

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-05-29 11:03:02 +02:00
..
2025-03-07 18:25:35 +01:00
2024-12-14 20:03:35 +01:00
2024-10-01 17:01:40 +02:00
2025-05-29 11:02:23 +02:00
2025-03-28 22:03:30 +01:00
2025-01-17 13:40:50 +01:00
2025-02-08 09:57:23 +01:00
2025-03-13 13:02:01 +01:00
2025-04-20 10:15:25 +02:00
2024-09-19 14:25:32 -05:00
2025-04-20 10:15:49 +02:00
2025-05-29 11:02:20 +02:00
2025-02-08 09:58:16 +01:00
2025-03-28 22:03:30 +01:00
2025-01-23 17:22:53 +01:00
2025-02-01 18:39:35 +01:00
2025-02-27 04:30:19 -08:00