1. 07 9月, 2012 6 次提交
    • I
      Merge tag 'perf-core-for-mingo' of... · 479d8758
      Ingo Molnar 提交于
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
       - Rename libtraceevent 'private' struct member to 'priv' so that it works
         in C++, from Steven Rostedt
      
       - Remove lots of exit()/die() calls from tools so that the main perf exit
         routine can take place, from David Ahern
      
       - Fix x86 build on x86-64, from David Ahern.
      
       - Remove some headers that prevented perf from building on Android,
         from David Ahern
      
       - {int,str,rb}list fixes from Suzuki K Poulose
      
       - perf.data header fixes from Namhyung Kim
      
       - Replace needless mempcpy with memcpy, to allow build on Android, from Irina Tirdea
      
       - Allow user to indicate objdump path, needed in cross environments, from
         Maciek Borzecki
      
       - Fix hardware cache event name generation, fix from Jiri Olsa
      
       - Add round trip test for sw, hw and cache event names, catching the
         problem Jiri fixed, after Jiri's patch, the test passes successfully.
      
       - Clean target should do clean for lib/traceevent too, fix from David Ahern
      
       - Check the right variable for allocation failure, fix from Namhyung Kim
      
       - Set up evsel->tp_format regardless of evsel->name being set already,
         fix from Namhyung Kim
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      479d8758
    • J
      perf tools: Fix cache event name generation · 275ef387
      Jiri Olsa 提交于
      If the event name is specified with all 3 components, the last one
      overwrites the previous one during the name composing within the
      parse_events_add_cache function.
      
      Fixing this by properly adjusting the string index.
      Reported-by: NJoel Uckelman <joel@lightboxtechnologies.com>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Joel Uckelman <joel@lightboxtechnologies.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LPU-Reference: 20120905175133.GA18352@krava.brq.redhat.com
      [ committer note: Remove the newline fix, done already in 42e1fb77 ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      275ef387
    • A
      perf test: Add roundtrip test for hardware cache events · 49f20d72
      Arnaldo Carvalho de Melo 提交于
      That nicely catches the problem reported by Joel Uckelman in
      http://permalink.gmane.org/gmane.linux.kernel.perf.user/1016 :
      
        [root@sandy ~]# perf test
         1: vmlinux symtab matches kallsyms: Ok
         2: detect open syscall event: Ok
         3: detect open syscall event on all cpus: Ok
         4: read samples using the mmap interface: Ok
         5: parse events tests: Ok
         6: x86 rdpmc test: Ok
         7: Validate PERF_RECORD_* events & perf_sample fields: Ok
         8: Test perf pmu format parsing: Ok
         9: Test dso data interface: Ok
        10: roundtrip evsel->name check: FAILED!
      
        [root@sandy ~]# perf test -v 10
        10: roundtrip evsel->name check:
        --- start ---
        L1-dcache-misses != L1-dcache-load-misses
        L1-dcache-misses != L1-dcache-store-misses
        L1-dcache-misses != L1-dcache-prefetch-misses
        L1-icache-misses != L1-icache-load-misses
        L1-icache-misses != L1-icache-prefetch-misses
        LLC-misses != LLC-load-misses
        LLC-misses != LLC-store-misses
        LLC-misses != LLC-prefetch-misses
        dTLB-misses != dTLB-load-misses
        dTLB-misses != dTLB-store-misses
        dTLB-misses != dTLB-prefetch-misses
        iTLB-misses != iTLB-load-misses
        branch-misses != branch-load-misses
        node-misses != node-load-misses
        node-misses != node-store-misses
        node-misses != node-prefetch-misses
        ---- end ----
        roundtrip evsel->name check: FAILED!
      
        [root@sandy ~]#
      
      Now lemme apply Jiri's fix and try it again...
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Joel Uckelman <joel@lightboxtechnologies.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-bbewtxw0rfipp5qy1j3jtg5d@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      49f20d72
    • A
      perf evlist: Add fprintf method · 78f067b3
      Arnaldo Carvalho de Melo 提交于
      For debugging, etc.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-fjimge1ovgh976qlt8dtmlp0@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      78f067b3
    • A
      perf tools: Remove extraneous newline when parsing hardware cache events · 42e1fb77
      Arnaldo Carvalho de Melo 提交于
      Noticed while developing a 'perf test' entry to verify that
      perf_evsel__name works.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-xz6zgh38mp3cjnd2udh38z8f@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      42e1fb77
    • A
      perf test: Add round trip test for sw and hw event names · 8ad7013b
      Arnaldo Carvalho de Melo 提交于
      It basically traverses the hardware and software event name arrays
      creating an evlist with all events, then it uses perf_evsel__name to
      check that the name is the expected one.
      
      With it I noticed this problem:
      
      [root@sandy ~]# perf test 10
      10: roundtrip evsel->name check:invalid or unsupported event: 'CPU-migrations'
      Run 'perf list' for a list of valid events
       FAILED!
      
      Changed it to "cpu-migrations" in the software event arrays and it
      worked.
      
      This is to catch problems like the one reported by Joel Uckelman in
      http://permalink.gmane.org/gmane.linux.kernel.perf.user/1016
      
      Hardware cache events will be checked in the following patch.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-5jskfkuqvf2fi257zmni0ftz@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8ad7013b
  2. 06 9月, 2012 20 次提交
  3. 05 9月, 2012 1 次提交
  4. 29 8月, 2012 10 次提交
  5. 27 8月, 2012 3 次提交
    • R
      oprofile: Remove 'WQ on CPUx, prefer CPUy' warning · 61bccf19
      Robert Richter 提交于
      Under certain workloads we see the following warnings:
      
       WQ on CPU0, prefer CPU1
       WQ on CPU0, prefer CPU2
       WQ on CPU0, prefer CPU3
      
      It warns the user that the wq to access a per-cpu buffers runs not on
      the same cpu. This happens if the wq is rescheduled on a different cpu
      than where the buffer is located. This was probably implemented to
      detect performance issues. Not sure if there actually is one as the
      buffers are copied to a single buffer anyway which should be the
      actual bottleneck.
      
      We wont change WQ implementation. Since a user can do nothing the
      warning is pointless. Removing it.
      
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      61bccf19
    • R
      oprofile, s390: Fix uninitialized memory access when writing to oprofilefs · 81ff3478
      Robert Richter 提交于
      If oprofilefs_ulong_from_user() is called with count equals zero, *val
      remains unchanged. Depending on the implementation it might be
      uninitialized. Fixing users of oprofilefs_ulong_ from_user().
      
      We missed these s390 changes with:
      
       913050b9 oprofile: Fix uninitialized memory access when writing to writing to oprofilefs
      
      Cc: stable@vger.kernel.org  # 3.3+
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      81ff3478
    • S
      perf/x86: Fix microcode revision check for SNB-PEBS · e3e45c01
      Stephane Eranian 提交于
      The following patch makes the microcode update code path
      actually invoke the perf_check_microcode() function and
      thus potentially renabling SNB PEBS.
      
      By default, CONFIG_MICROCODE_OLD_INTERFACE is
      forced to Y in arch/x86/Kconfig. There is no
      way to disable this. That means that the code
      path used in arch/x86/kernel/microcode_core.c
      did not include the call to perf_check_microcode().
      
      Thus, even though the microcode was updated to a
      version that fixes the SNB PEBS problem, perf_event
      would still return EOPNOTSUPP when enabling precise
      sampling.
      
      This patch simply adds a call to perf_check_microcode()
      in the call path used when OLD_INTERFACE=y.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Acked-by: NBorislav Petkov <borislav.petkov@amd.com>
      Cc: peterz@infradead.org
      Cc: andi@firstfloor.org
      Link: http://lkml.kernel.org/r/20120824133434.GA8014@quadSigned-off-by: NIngo Molnar <mingo@kernel.org>
      e3e45c01