• Peter Zijlstra's avatar
    perf: Optimize context ops · 1b9a644f
    Peter Zijlstra authored
    Assuming we don't mix events of different pmus onto a single context
    (with the exeption of software events inside a hardware group) we can
    now assume that all events on a particular context belong to the same
    pmu, hence we can disable the pmu for the entire context operations.
    
    This reduces the amount of hardware writes.
    
    The exception for swevents comes from the fact that the sw pmu disable
    is a nop.
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: paulus <paulus@samba.org>
    Cc: stephane eranian <eranian@googlemail.com>
    Cc: Robert Richter <robert.richter@amd.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Lin Ming <ming.m.lin@intel.com>
    Cc: Yanmin <yanmin_zhang@linux.intel.com>
    LKML-Reference: <new-submission>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    1b9a644f
perf_event.c 141 KB