diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2022-09-01 15:09:57 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-09-06 11:33:02 +0200 |
commit | 2abe681da0a192ab850a5271d838a7817b469fca (patch) | |
tree | 8d6391f254b100551c3166bf65ce424613f9fbbf /arch/powerpc | |
parent | perf: Use sample_flags for branch stack (diff) | |
download | linux-2abe681da0a192ab850a5271d838a7817b469fca.tar.xz linux-2abe681da0a192ab850a5271d838a7817b469fca.zip |
perf: Use sample_flags for weight
Use the new sample_flags to indicate whether the weight field is filled
by the PMU driver.
Remove the weight field from the perf_sample_data_init() to minimize the
number of cache lines touched.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220901130959.1285717-5-kan.liang@linux.intel.com
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/perf/core-book3s.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 1ad1efdb33f9..a5c95a2006ea 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c @@ -2305,9 +2305,10 @@ static void record_and_restart(struct perf_event *event, unsigned long val, ppmu->get_mem_data_src(&data.data_src, ppmu->flags, regs); if (event->attr.sample_type & PERF_SAMPLE_WEIGHT_TYPE && - ppmu->get_mem_weight) + ppmu->get_mem_weight) { ppmu->get_mem_weight(&data.weight.full, event->attr.sample_type); - + data.sample_flags |= PERF_SAMPLE_WEIGHT_TYPE; + } if (perf_event_overflow(event, &data, regs)) power_pmu_stop(event, 0); } else if (period) { |