• J
    x86: AMD Support for perf_counter · f87ad35d
    Jaswinder Singh Rajput 提交于
    Supported basic performance counter for AMD K7 and later:
    
    $ perfstat -e 0,1,2,3,4,5,-1,-2,-3,-4,-5 ls > /dev/null
    
     Performance counter stats for 'ls':
    
          12.298610  task clock ticks     (msecs)
    
            3298477  CPU cycles           (events)
            1406354  instructions         (events)
             749035  cache references     (events)
              16939  cache misses         (events)
             100589  branches             (events)
              11159  branch misses        (events)
           7.627540  cpu clock ticks      (msecs)
          12.298610  task clock ticks     (msecs)
                500  pagefaults           (events)
                  6  context switches     (events)
                  3  CPU migrations       (events)
    
     Wall-clock time elapsed:     8.672290 msecs
    Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    f87ad35d
perf_counter.c 21.1 KB