linux/arch/x86/events
Yabin Cui d4ac100948 perf/core: Save raw sample data conditionally based on sample type
[ Upstream commit b9c44b9147 ]

Currently, space for raw sample data is always allocated within sample
records for both BPF output and tracepoint events. This leads to unused
space in sample records when raw sample data is not requested.

This patch enforces checking sample type of an event in
perf_sample_save_raw_data(). So raw sample data will only be saved if
explicitly requested, reducing overhead when it is not needed.

Fixes: 0a9081cf0a ("perf/core: Add perf_sample_save_raw_data() helper")
Signed-off-by: Yabin Cui <yabinc@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240515193610.2350456-2-yabinc@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-02-08 09:56:53 +01:00
..
amd perf/core: Save raw sample data conditionally based on sample type 2025-02-08 09:56:53 +01:00
intel perf/x86/intel: Add Arrow Lake U support 2025-01-09 13:33:43 +01:00
zhaoxin perf/x86: Support counter mask 2024-07-04 16:00:36 +02:00
core.c Merge branch 'perf/urgent' into perf/core, to pick up fixes 2024-09-05 11:17:43 +02:00
Kconfig perf/x86/Kconfig: Fix indentation in the Kconfig file 2022-05-25 15:54:26 +02:00
Makefile perf/x86: Move branch classifier 2022-08-27 00:05:44 +02:00
msr.c perf/x86/msr: Switch to new Intel CPU model defines 2024-04-29 10:31:04 +02:00
perf_event.h perf/x86/intel: Support Perfmon MSRs aliasing 2024-07-04 16:00:40 +02:00
perf_event_flags.h perf/x86/intel: Support branch counters logging 2023-10-27 15:05:11 +02:00
probe.c perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
probe.h perf/x86/rapl: Add msr mask support 2021-02-10 14:44:54 +01:00
rapl.c perf/x86/rapl: Fix the energy-pkg event for AMD CPUs 2024-09-05 12:02:14 +02:00
utils.c perf/x86/lbr: Filter vsyscall addresses 2023-10-08 12:25:18 +02:00