Messages in this thread | | | Subject | Re: [PATCH 02/11] perf: Do not get values from disabled counters in group format read | From | Peter Zijlstra <> | Date | Wed, 24 Oct 2012 14:32:22 +0200 |
| |
On Wed, 2012-10-24 at 14:14 +0200, Jiri Olsa wrote: > > well, x86_pmu_read calls x86_perf_event_update, which expects the > event > is active.. if it's not it'll update the count from whatever left in > event.hw.idx counter.. could be uninitialized or used by others.. > Oh right, we shouldn't call ->read() unless ->state == PERF_EVENT_STATE_ACTIVE. Aside from that, perf_event_count() should return the 'right' value regardless state (although excluding ERROR might make sense).
| |