1. 06 Dec, 2011 1 commit
  2. 05 Dec, 2011 6 commits
    • Anton Blanchard's avatar
      perf stat: Failure with "Operation not supported" · 38f6ae1e
      Anton Blanchard authored
      perf stat is failing on PowerPC:
      
        Error: open_counter returned with 95 (Operation not supported). /bin/dmesg may provide additional information.
      
        Fatal: Not all events could be opened.
      
      commit 370faf1d (perf stat: Fail softly on unsupported events)
      added a check for failure returning ENOENT, but the POWER backend
      returns EOPNOTSUPP. It looks like alpha, blackfin and mips do the
      same.
      
      With the patch applied, things work as expected:
      
       Performance counter stats for '/bin/true':
      
                0.362176 task-clock                #    0.623 CPUs utilized
                       0 context-switches          #    0.000 M/sec
                       0 CPU-migrations            #    0.000 M/sec
                      28 page-faults               #    0.077 M/sec
               1,677,020 cycles                    #    4.630 GHz
         <not supported> stalled-cycles-frontend
         <not supported> stalled-cycles-backend
                 431,220 instructions              #    0.26  insns per cycle
                 101,889 branches                  #  281.325 M/sec
                   4,145 branch-misses             #    4.07% of all branches
      
             0.000581361 seconds time elapsed
      
      Cc: <stable@kernel.org> # 3.0+
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20111202093833.5fef7226@krytenSigned-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      38f6ae1e
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/urgent' of... · dc440d10
      Ingo Molnar authored
      Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/urgent
      dc440d10
    • Ingo Molnar's avatar
    • Peter Zijlstra's avatar
      perf: Fix loss of notification with multi-event · 10c6db11
      Peter Zijlstra authored
      When you do:
              $ perf record -e cycles,cycles,cycles noploop 10
      
      You expect about 10,000 samples for each event, i.e., 10s at
      1000samples/sec. However, this is not what's happening. You
      get much fewer samples, maybe 3700 samples/event:
      
      $ perf report -D | tail -15
      Aggregated stats:
                 TOTAL events:      10998
                  MMAP events:         66
                  COMM events:          2
                SAMPLE events:      10930
      cycles stats:
                 TOTAL events:       3644
                SAMPLE events:       3644
      cycles stats:
                 TOTAL events:       3642
                SAMPLE events:       3642
      cycles stats:
                 TOTAL events:       3644
                SAMPLE events:       3644
      
      On a Intel Nehalem or even AMD64, there are 4 counters capable
      of measuring cycles, so there is plenty of space to measure those
      events without multiplexing (even with the NMI watchdog active).
      And even with multiplexing, we'd expect roughly the same number
      of samples per event.
      
      The root of the problem was that when the event that caused the buffer
      to become full was not the first event passed on the cmdline, the user
      notification would get lost. The notification was sent to the file
      descriptor of the overflowed event but the perf tool was not polling
      on it.  The perf tool aggregates all samples into a single buffer,
      i.e., the buffer of the first event. Consequently, it assumes
      notifications for any event will come via that descriptor.
      
      The seemingly straight forward solution of moving the waitq into the
      ringbuffer object doesn't work because of life-time issues. One could
      perf_event_set_output() on a fd that you're also blocking on and cause
      the old rb object to be freed while its waitq would still be
      referenced by the blocked thread -> FAIL.
      
      Therefore link all events to the ringbuffer and broadcast the wakeup
      from the ringbuffer object to all possible events that could be waited
      upon. This is rather ugly, and we're open to better solutions but it
      works for now.
      Reported-by: default avatarStephane Eranian <eranian@google.com>
      Finished-by: default avatarStephane Eranian <eranian@google.com>
      Reviewed-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20111126014731.GA7030@quadSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      10c6db11
    • Robert Richter's avatar
      perf, x86: Force IBS LVT offset assignment for family 10h · 16e5294e
      Robert Richter authored
      On AMD family 10h we see firmware bug messages like the following:
      
       [Firmware Bug]: cpu 6, try to use APIC500 (LVT offset 0) for vector 0x10400, but the register is already in use for vector 0xf9 on another cpu
       [Firmware Bug]: cpu 6, IBS interrupt offset 0 not available (MSRC001103A=0x0000000000000100)
       [Firmware Bug]: using offset 1 for IBS interrupts
       [Firmware Bug]: workaround enabled for IBS LVT offset
       perf: AMD IBS detected (0x00000007)
      
      We always see this, since the offsets are not assigned by the BIOS for
      this family. Force LVT offset assignment in this case. If the OS
      assignment fails, fallback to BIOS settings and try to setup this.
      
      The fallback to BIOS settings weakens the family check since
      force_ibs_eilvt_setup() may fail e.g. in case of virtual machines.
      But setup may still succeed if BIOS offsets are correct.
      
      Other families don't have a workaround implemented that assigns LVT
      offsets. It's ok, to drop calling force_ibs_eilvt_setup() for that
      families.
      
      With the patch the [Firmware Bug] messages vanish. We see now:
      
       IBS: LVT offset 1 assigned
       perf: AMD IBS detected (0x00000007)
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20111109162225.GO12451@erda.amd.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      16e5294e
    • Peter Zijlstra's avatar
      perf, x86: Disable PEBS on SandyBridge chips · 6a600a8b
      Peter Zijlstra authored
      Cc: Stephane Eranian <eranian@google.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6a600a8b
  3. 02 Dec, 2011 1 commit
  4. 16 Nov, 2011 2 commits
  5. 15 Nov, 2011 1 commit
  6. 14 Nov, 2011 8 commits
  7. 13 Nov, 2011 1 commit
  8. 12 Nov, 2011 17 commits
  9. 11 Nov, 2011 3 commits