• Peter Zijlstra's avatar
    perf: Add a few assertions · f3c0eba2
    Peter Zijlstra authored
    While auditing 6b959ba2 ("perf/core: Fix reentry problem in
    perf_output_read_group()") a few spots were found that wanted
    assertions.
    
    Notable for_each_sibling_event() relies on exclusion from
    modification. This would normally be holding either ctx->lock or
    ctx->mutex, however due to how things are constructed disabling IRQs
    is a valid and sufficient substitute for ctx->lock.
    
    Another possible site to add assertions would be the various
    pmu::{add,del,read,..}() methods, but that's not trivially expressable
    in C -- the best option is wrappers, but those are easy enough to
    forget.
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    f3c0eba2
core.c 323 KB