Skip to contentSkip to conversation

x86: pebs: remove redundant assignments to sample.period

PATCH Applied Changbin Du 2 participants 2 messages May 6, 2025 – May 16, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: pebs: remove redundant assignments to sample.period

The perf_sample_data_init() has already set the period of sample, so no need to do it again.

---
 arch/x86/events/intel/ds.c | 3 ---
 1 file changed, 3 deletions(-)
arch/x86/events/intel/ds.c +0 -3
index 9b20acc0e932..292ef21cbfbd 100644
@@ -1828,8 +1828,6 @@ static void setup_pebs_fixed_sample_data(struct perf_event *event,
 
 	perf_sample_data_init(data, 0, event->hw.last_period);
 
-	data->period = event->hw.last_period;
-
 	/*
 	 * Use latency for weight (only avail with PEBS-LL)
 	 */
@@ -2082,7 +2080,6 @@ static void setup_pebs_adaptive_sample_data(struct perf_event *event,
 	sample_type = event->attr.sample_type;
 	format_group = basic->format_group;
 	perf_sample_data_init(data, 0, event->hw.last_period);
-	data->period = event->hw.last_period;
 
 	setup_pebs_time(event, data, basic->tsc);
 
Signature · 1 line
2.43.0
merge bot Applied
#1 lore raw

[tip: perf/core] perf/x86/intel/ds: Remove redundant assignments to sample.period

The following commit has been merged into the perf/core branch of tip:

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     75a9001bab36f0456f6aae1ab0aa487db456464a
Gitweb:        https://git.kernel.org/tip/75a9001bab36f0456f6aae1ab0aa487db456464a
Author:        Changbin Du <[email protected]>
AuthorDate:    Tue, 06 May 2025 17:49:07 +08:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Fri, 16 May 2025 17:53:53 +02:00

perf/x86/intel/ds: Remove redundant assignments to sample.period

The perf_sample_data_init() has already set the period of sample, so no need to do it again.

---
 arch/x86/events/intel/ds.c | 3 ---
 1 file changed, 3 deletions(-)
arch/x86/events/intel/ds.c +0 -3
index 61ee698..319d0d4 100644
@@ -1831,8 +1831,6 @@ static void setup_pebs_fixed_sample_data(struct perf_event *event,
 
 	perf_sample_data_init(data, 0, event->hw.last_period);
 
-	data->period = event->hw.last_period;
-
 	/*
 	 * Use latency for weight (only avail with PEBS-LL)
 	 */
@@ -2085,7 +2083,6 @@ static void setup_pebs_adaptive_sample_data(struct perf_event *event,
 	sample_type = event->attr.sample_type;
 	format_group = basic->format_group;
 	perf_sample_data_init(data, 0, event->hw.last_period);
-	data->period = event->hw.last_period;
 
 	setup_pebs_time(event, data, basic->tsc);