• Peter Zijlstra's avatar
    perf/core: Fix perf_event_read() · 0c1cbc18
    Peter Zijlstra authored
    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: default avatarPeter 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: default avatarIngo Molnar <mingo@kernel.org>
    0c1cbc18
core.c 269 KB