]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf/x86/intel/ds: Remove redundant assignments to sample.period
authorChangbin Du <changbin.du@huawei.com>
Tue, 6 May 2025 09:49:07 +0000 (17:49 +0800)
committerIngo Molnar <mingo@kernel.org>
Fri, 16 May 2025 15:53:53 +0000 (17:53 +0200)
The perf_sample_data_init() has already set the period of sample, so no
need to do it again.

Signed-off-by: Changbin Du <changbin.du@huawei.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250506094907.2724-1-changbin.du@huawei.com
arch/x86/events/intel/ds.c

index 61ee698deaab655bec15e062fc3ed119a43640c1..319d0d4ce30c9d078998dcda06da08bd0f31a46d 100644 (file)
@@ -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);