1. 17 1月, 2015 1 次提交
    • V
      perf tools: Avoid build splat for syscall numbers with uclibc · ea1fe3a8
      Vineet Gupta 提交于
      This is due to duplicated unistd inclusion (via uClibc headers + kernel headers)
      Also seen on ARM uClibc based tools
      
         ------- ARC build ---------->8-------------
      
        CC       util/evlist.o
      In file included from
      ~/arc/k.org/arch/arc/include/uapi/asm/unistd.h:25:0,
                       from util/../perf-sys.h:10,
                       from util/../perf.h:15,
                       from util/event.h:7,
                       from util/event.c:3:
      ~/arc/k.org/include/uapi/asm-generic/unistd.h:906:0:
      warning: "__NR_fcntl64" redefined [enabled by default]
       #define __NR_fcntl64 __NR3264_fcntl
       ^
      In file included from
      ~/arc/gnu/INSTALL_1412-arc-2014.12-rc1/arc-snps-linux-uclibc/sysroot/usr/include/sys/syscall.h:24:0,
                       from util/../perf-sys.h:6,
         ----------------->8-------------------
      
         ------- ARM build ---------->8-------------
      
        CC FPIC  plugin_scsi.o
      In file included from util/../perf-sys.h:9:0,
                       from util/../perf.h:15,
                       from util/cache.h:7,
                       from perf.c:12:
      ~/arc/k.org/arch/arm/include/uapi/asm/unistd.h:28:0:
      warning: "__NR_restart_syscall" redefined [enabled by default]
      In file included from
      ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/syscall.h:25:0,
                       from util/../perf-sys.h:6,
                       from util/../perf.h:15,
                       from util/cache.h:7,
                       from perf.c:12:
      ~/buildroot/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/bits/sysnum.h:17:0:
      note: this is the location of the previous definition
         ----------------->8-------------------
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1421156604-30603-4-git-send-email-vgupta@synopsys.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ea1fe3a8
  2. 29 10月, 2014 1 次提交
  3. 08 7月, 2014 1 次提交
  4. 05 5月, 2014 9 次提交
  5. 02 5月, 2014 1 次提交
  6. 28 4月, 2014 1 次提交
    • J
      perf tests: Add thread maps lookup automated tests · 4e85edfc
      Jiri Olsa 提交于
      Adding automated test for memory maps lookup within multiple machines
      threads.
      
      The test creates 4 threads and separated memory maps. It checks that we
      could use thread__find_addr_map function with thread object based on TID
      to find memory maps.
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1397490723-1992-2-git-send-email-jolsa@redhat.comSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      4e85edfc
  7. 14 3月, 2014 1 次提交
    • D
      perf bench: Add futex-hash microbenchmark · a0439711
      Davidlohr Bueso 提交于
      Introduce futexes to perf-bench and add a program that stresses and
      measures the kernel's implementation of the hash table.
      
      This is a multi-threaded program that simply measures the amount of
      failed futex wait calls - we only want to deal with the hashing
      overhead, so a negative return of futex_wait_setup() is enough to do the
      trick.
      
      An example run:
      
        $ perf bench futex hash -t 32
        Run summary [PID 10989]: 32 threads, each operating on 1024 [private] futexes for 10 secs.
      
        [thread  0] futexes: 0x19d9b10 ... 0x19dab0c [ 418713 ops/sec ]
        [thread  1] futexes: 0x19daca0 ... 0x19dbc9c [ 469913 ops/sec ]
        [thread  2] futexes: 0x19dbe30 ... 0x19dce2c [ 479744 ops/sec ]
        ...
        [thread 31] futexes: 0x19fbb80 ... 0x19fcb7c [ 464179 ops/sec ]
      
        Averaged 454310 operations/sec (+- 0.84%), total secs = 10
      Signed-off-by: NDavidlohr Bueso <davidlohr@hp.com>
      Acked-by: NDarren Hart <dvhart@linux.intel.com>
      Cc: Aswin Chandramouleeswaran <aswin@hp.com>
      Cc: Darren Hart <dvhart@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jason Low <jason.low2@hp.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Scott J Norton <scott.norton@hp.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Waiman Long <Waiman.Long@hp.com>
      Link: http://lkml.kernel.org/r/1387081917-9102-2-git-send-email-davidlohr@hp.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a0439711
  8. 08 3月, 2014 1 次提交
  9. 18 2月, 2014 2 次提交
    • J
      perf record: Add readable output for callchain debug · a601fdff
      Jiri Olsa 提交于
      Adding people readable output for callchain debug, to get following '-v'
      output:
      
        $ perf record -v -g ls
        callchain: type DWARF
        callchain: stack dump size 4096
        ...
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1391427883-13443-3-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a601fdff
    • J
      perf tools: Add call-graph option support into .perfconfig · eb853e80
      Jiri Olsa 提交于
      Adding call-graph option support into .perfconfig file, so it's now
      possible use call-graph option like:
      
        [top]
              call-graph = fp
      
        [record]
              call-graph = dwarf,8192
      
      Above options ONLY setup the unwind method. To enable perf record/top to
      actually use it the command line option -g/-G must be specified.
      
      The --call-graph option overloads .perfconfig setup.
      
      Assuming above configuration:
      
        $ perf record -g ls
        - enables dwarf unwind with user stack size dump 8192 bytes
      
        $ perf top -G
        - enables frame pointer unwind
      
        $ perf record --call-graph=fp ls
        - enables frame pointer unwind
      
        $ perf top --call-graph=dwarf,4096 ls
        - enables dwarf unwind with user stack size dump 4096 bytes
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1391427883-13443-2-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      eb853e80
  10. 30 1月, 2014 1 次提交
  11. 21 1月, 2014 1 次提交
  12. 15 1月, 2014 1 次提交
  13. 13 1月, 2014 1 次提交
  14. 20 12月, 2013 1 次提交
  15. 28 11月, 2013 1 次提交
  16. 13 11月, 2013 1 次提交
  17. 06 11月, 2013 1 次提交
  18. 22 10月, 2013 1 次提交
  19. 04 10月, 2013 2 次提交
  20. 12 8月, 2013 1 次提交
  21. 01 4月, 2013 1 次提交
    • A
      perf tools: Add support for weight v7 (modified) · 05484298
      Andi Kleen 提交于
      perf record has a new option -W that enables weightened sampling.
      
      Add sorting support in top/report for the average weight per sample and the
      total weight sum. This allows to both compare relative cost per event
      and the total cost over the measurement period.
      
      Add the necessary glue to perf report, record and the library.
      
      v2: Merge with new hist refactoring.
      v3: Fix manpage. Remove value check.
      Rename global_weight to weight and weight to local_weight.
      v4: Readd sort keys to manpage
      v5: Move weight to end
      v6: Move weight to template
      v7: Rename weight key.
      
      Original patch from Andi modified by Stephane Eranian <eranian@google.com>
      to include ONLY the weight supporting code and apply to pristine 3.8.0-rc4.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1359040242-8269-6-git-send-email-eranian@google.com
      [ committer note: changed to cope with fc5871ed and the hists_link perf test entry ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      05484298
  22. 03 3月, 2013 1 次提交
  23. 16 2月, 2013 1 次提交
  24. 07 2月, 2013 1 次提交
    • D
      perf evlist: Make event_copy local to mmaps · 0479b8b9
      David Ahern 提交于
      I am getting segfaults *after* the time sorting of perf samples where
      the event type is off the charts:
      
      (gdb) bt
      \#0  0x0807b1b2 in hists__inc_nr_events (hists=0x80a99c4, type=1163281902) at util/hist.c:1225
      \#1  0x08070795 in perf_session_deliver_event (session=0x80a9b90, event=0xf7a6aff8, sample=0xffffc318, tool=0xffffc520,
          file_offset=0) at util/session.c:884
      \#2  0x0806f9b9 in flush_sample_queue (s=0x80a9b90, tool=0xffffc520) at util/session.c:555
      \#3  0x0806fc53 in process_finished_round (tool=0xffffc520, event=0x0, session=0x80a9b90) at util/session.c:645
      
      This is bizarre because the event has already been processed once --
      before it was added to the samples queue -- and the event was found to
      be sane at that time.
      
      There seem to be 2 causes:
      
      1. perf_evlist__mmap_read updates the read location even though there
      are outstanding references to events sitting in the mmap buffers via the
      ordered samples queue.
      
      2. There is a single evlist->event_copy for all evlist entries.
      event_copy is used to handle an event wrapping at the mmap buffer
      boundary.
      
      This patch addresses the second problem - making event_copy local to
      each perf_mmap. With this change my highly repeatable use case no longer
      fails.
      
      The first problem is much more complicated and will be the subject of a
      future patch.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1360098762-61827-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0479b8b9
  25. 25 1月, 2013 2 次提交
  26. 20 11月, 2012 2 次提交
    • D
      perf: Make perf build for x86 with UAPI disintegration applied · d2709c7c
      David Howells 提交于
      Make perf build for x86 once the UAPI disintegration patches for that arch
      have been applied by adding the appropriate -I flags - in the right order -
      and then converting some #includes that use ../.. notation to find main kernel
      headerfiles to use <asm/foo.h> and <linux/foo.h> instead.
      
      Note that -Iarch/foo/include/uapi is present _before_ -Iarch/foo/include.
      This makes sure we get the userspace version of the pt_regs struct.  Ideally,
      we wouldn't have the latter -I flag at all, but unfortunately we want
      asm/svm.h and asm/vmx.h in builtin-kvm.c and these aren't part of the UAPI -
      at least not for x86.  I wonder if the bits outside of the __KERNEL__ guards
      *should* be transferred there.
      
      I note also that perf seems to do its dependency handling manually by listing
      all the header files it might want to use in LIB_H in the Makefile.  Can this
      be changed to use -MD?
      
      Note that to do make this work, we need to export and UAPI disintegrate
      linux/hw_breakpoint.h, which I think should've been exported previously so that
      perf can access the bits.  We have to do this in the same patch to maintain
      bisectability.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      d2709c7c
    • S
      perf powerpc: Use uapi/unistd.h to fix build error · f2d9cae9
      Sukadev Bhattiprolu 提交于
      Use the 'unistd.h' from arch/powerpc/include/uapi to build the perf tool.
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Anton Blanchard <anton@au1.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: linuxppc-dev@ozlabs.org
      Link: http://lkml.kernel.org/r/20121107191818.GA16211@us.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f2d9cae9
  27. 15 11月, 2012 2 次提交