mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
drivers: soc: qcom: read current counter value before PMU save
Call perf_event_read_local() to update current counter value in hw_perf_event structure before saving PMU snapshot to shared memory. Change-Id: Id5945cd6b6c9fab6f87917224b5b5f54dca5ef9c Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
This commit is contained in:
parent
8c86f95982
commit
73ee91fc44
1 changed files with 5 additions and 0 deletions
|
|
@ -632,6 +632,8 @@ static void save_cpugrp_pmu_events(struct memlat_cpu_grp *cpu_grp, u8 cpu)
|
|||
!cpus_data->common_evs[i])
|
||||
continue;
|
||||
|
||||
perf_event_read_local(cpus_data->common_evs[i],
|
||||
&ev_count, NULL, NULL);
|
||||
ev_count = local64_read(&cpus_data->common_evs[i]->hw.prev_count);
|
||||
store_event_val(ev_count, hw_id, cpu);
|
||||
}
|
||||
|
|
@ -651,6 +653,9 @@ static void save_mon_pmu_events(struct memlat_mon *mon, u8 cpu)
|
|||
if (hw_id == INVALID_PMU_HW_IDX ||
|
||||
!ev_data->mon_evs[i])
|
||||
continue;
|
||||
|
||||
perf_event_read_local(ev_data->mon_evs[i],
|
||||
&ev_count, NULL, NULL);
|
||||
ev_count = local64_read(&ev_data->mon_evs[i]->hw.prev_count);
|
||||
store_event_val(ev_count, hw_id, cpu);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue