Skip to content

Commit e60b7cb

Browse files
Like XuPeter Zijlstra
authored andcommitted
x86/events/intel/ds: Enable large PEBS for PERF_SAMPLE_WEIGHT_TYPE
All the information required by the PERF_SAMPLE_WEIGHT is available in the pebs record. Thus large PEBS could be enabled for PERF_SAMPLE_WEIGHT sample type to save PMIs overhead until other non-compatible flags such as PERF_SAMPLE_DATA_PAGE_SIZE (due to lack of munmap tracking) stop it. To cover new weight extension, add PERF_SAMPLE_WEIGHT_TYPE to the guardian LARGE_PEBS_FLAGS. Tested it with: $ perf mem record -c 1000 workload Before: Captured and wrote 0.126 MB perf.data (958 samples) [958 PMIs] After: Captured and wrote 0.313 MB perf.data (4859 samples) [3 PMIs] Reported-by: Yongchao Duan <[email protected]> Signed-off-by: Like Xu <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent b13bacc commit e60b7cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/events/perf_event.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ struct amd_nb {
136136
PERF_SAMPLE_DATA_SRC | PERF_SAMPLE_IDENTIFIER | \
137137
PERF_SAMPLE_TRANSACTION | PERF_SAMPLE_PHYS_ADDR | \
138138
PERF_SAMPLE_REGS_INTR | PERF_SAMPLE_REGS_USER | \
139-
PERF_SAMPLE_PERIOD | PERF_SAMPLE_CODE_PAGE_SIZE)
139+
PERF_SAMPLE_PERIOD | PERF_SAMPLE_CODE_PAGE_SIZE | \
140+
PERF_SAMPLE_WEIGHT_TYPE)
140141

141142
#define PEBS_GP_REGS \
142143
((1ULL << PERF_REG_X86_AX) | \

0 commit comments

Comments
 (0)