• V
    perf_counter: Add P6 PMU support · 11d1578f
    Vince Weaver 提交于
    Add basic P6 PMU support. The P6 uses the EVNTSEL0 EN bit to
    enable/disable both its counters. We use this for the
    global enable/disable, and clear all config bits (except EN)
    to disable individual counters.
    
    Actual ia32 hardware doesn't support lfence, so use a locked
    op without side-effect to implement a full barrier.
    
    perf stat and perf record seem to function correctly.
    
    [a.p.zijlstra@chello.nl: cleanups and complete the enable/disable code]
    Signed-off-by: NVince Weaver <vince@deater.net>
    Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
    LKML-Reference: <Pine.LNX.4.64.0907081718450.2715@pianoman.cluster.toy>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    11d1578f
perf.h 2.0 KB