mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf: Fix mmap_page::offset computation
There's multiple reason the counter might be unavailable, change the condition to !->index since perf_event_index() should return 0 for all those cases. Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
35edc2a509
commit
365a403848
1 changed files with 1 additions and 1 deletions
|
|
@ -3268,7 +3268,7 @@ void perf_event_update_userpage(struct perf_event *event)
|
|||
barrier();
|
||||
userpg->index = perf_event_index(event);
|
||||
userpg->offset = perf_event_count(event);
|
||||
if (event->state == PERF_EVENT_STATE_ACTIVE)
|
||||
if (userpg->index)
|
||||
userpg->offset -= local64_read(&event->hw.prev_count);
|
||||
|
||||
userpg->time_enabled = enabled +
|
||||
|
|
|
|||
Loading…
Reference in a new issue