• P
    perf/core: Fix perf_event_read() · 0c1cbc18
    Peter Zijlstra 提交于
    perf_event_read() has a number of issues regarding the timekeeping bits.
    
     - The IPI didn't update group times when it found INACTIVE
    
     - The direct call would not re-check ->state after taking ctx->lock
       which can result in ->count and timestamps getting out of sync.
    
    And we can make use of the ordering introduced for perf_event_stop()
    to make it more accurate for ACTIVE.
    Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: NIngo Molnar <mingo@kernel.org>
    0c1cbc18
core.c 268.9 KB