• Paul Mackerras's avatar
    perf_counter: Put whole group on when enabling group leader · 6751b71e
    Paul Mackerras authored
    Currently, if you have a group where the leader is disabled and there
    are siblings that are enabled, and then you enable the leader, we only
    put the leader on the PMU, and not its enabled siblings.  This is
    incorrect, since the enabled group members should be all on or all off
    at any given point.
    
    This fixes it by adding a call to group_sched_in in
    __perf_counter_enable in the case where we're enabling a group leader.
    
    To avoid the need for a forward declaration this also moves
    group_sched_in up before __perf_counter_enable.  The actual content of
    group_sched_in is unchanged by this patch.
    
    [ Impact: fix bug in counter enable code ]
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
    LKML-Reference: <18951.34946.451546.691693@drongo.ozlabs.ibm.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    6751b71e
perf_counter.c 80.1 KB