perf: Pass last sampling period to perf_sample_data_init()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / powerpc / perf / core-book3s.c
index 02aee03e713c6f287721faa7079ac760c865f7c9..8f84bcba18da12f1ee9b1f1f5727075777febb8c 100644 (file)
@@ -1299,8 +1299,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
        if (record) {
                struct perf_sample_data data;
 
-               perf_sample_data_init(&data, ~0ULL);
-               data.period = event->hw.last_period;
+               perf_sample_data_init(&data, ~0ULL, event->hw.last_period);
 
                if (event->attr.sample_type & PERF_SAMPLE_ADDR)
                        perf_get_data_addr(regs, &data.addr);