1. 10 1月, 2013 1 次提交
  2. 15 11月, 2012 1 次提交
  3. 18 10月, 2012 1 次提交
  4. 27 9月, 2012 1 次提交
  5. 05 9月, 2012 1 次提交
  6. 24 8月, 2012 1 次提交
    • S
      powerpc/perf: Use pmc_overflow() to detect rolled back events · 81331211
      Sukadev Bhattiprolu 提交于
      For certain speculative events on Power7, 'perf stat' reports far higher
      event count than 'perf record' for the same event.
      
      As described in following commit, a performance monitor exception is raised
      even when the the performance events are rolled back.
      
              commit 0837e324
              Author: Anton Blanchard <anton@samba.org>
              Date:   Wed Mar 9 14:38:42 2011 +1100
      
      perf_event_interrupt() records an event only when an overflow occurs. But
      this check for overflow is a simple 'if (val < 0)'.
      
      Because the events are rolled back, this check for overflow fails and the
      event is not recorded. perf_event_interrupt() later uses pmc_overflow() to
      detect the overflow and resets the counters and the events are lost completely.
      
      To properly detect the overflow of rolled back events, use pmc_overflow()
      even when recording events.
      
      To reproduce:
              $ cat strcpy.c
              #include <stdio.h>
              #include <string.h>
              main()
              {
                      char buf[256];
      
                      alarm(5);
                      while(1)
                              strcpy(buf, "string1");
              }
      
              $ perf record -e r20014 ./strcpy
              $ perf report -n > report.1
              $ perf stat -e r20014 > report.2
              # Compare report.1 and report.2
      Reported-by: NMaynard Johnson <mpjohn@us.ibm.com>
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      81331211
  7. 10 7月, 2012 4 次提交
  8. 09 5月, 2012 1 次提交
  9. 28 3月, 2012 1 次提交
    • B
      powerpc/perf: Fix instruction address sampling on 970 and Power4 · 1ce447b9
      Benjamin Herrenschmidt 提交于
      970 and Power4 don't support "continuous sampling" which means that
      when we aren't in marked instruction sampling mode (marked events),
      SIAR isn't updated with the last instruction sampled before the
      perf interrupt. On those processors, we must thus use the exception
      SRR0 value as the sampled instruction pointer.
      
      Those processors also don't support the SIPR and SIHV bits in MMCRA
      which means we need some kind of heuristic to decide if SIAR values
      represent kernel or user addresses.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      1ce447b9
  10. 23 2月, 2012 1 次提交