1. 05 2月, 2011 1 次提交
    • A
      perf annotate: Move annotate functions to util/ · 78f7defe
      Arnaldo Carvalho de Melo 提交于
      They will be used by perf top, so that we have just one set of routines
      to do annotation.
      
      Rename "struct sym_priv" to "struct annotation", etc, to clarify this
      code a bit.
      
      Rename "struct sym_ext" to "struct source_line", to give it a meaningful
      name, that clarifies that it is a the result of an addr2line call, that
      is sorted by percentage one particular source code line appeared in the
      annotation.
      
      And since we're moving things around also rename 'sym_hist->ip' to
      'sym_hist->addr' as we want to do data structure annotation at some
      point.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      78f7defe
  2. 02 2月, 2011 3 次提交
    • A
      perf tools: Don't try to build python bindings if Python.h not available · 978f626c
      Arnaldo Carvalho de Melo 提交于
      Just leverage the test done for python support in 'python script',
      emitting a warning about losing those features if python-dev[el] is not
      installed.
      Reported-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      978f626c
    • A
      perf tools: Fix up 'make clean' target · 568bb7b8
      Arnaldo Carvalho de Melo 提交于
      It wasn't using $(OUTPUT) to rm *.o and there were some funny looking
      automake files that never get created but were being deleted anyway.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      568bb7b8
    • A
      perf tools: Remove verbose build messages for the python binding · 067187fc
      Arnaldo Carvalho de Melo 提交于
      Also now it builds it in a well known location:
      
      [acme@felicio linux]$ rm -rf ../build/perf/
      [acme@felicio linux]$ mkdir ../build/perf
      [acme@felicio linux]$ make -j2 O=~acme/git/build/perf -C tools/perf/
      <SNIP>
      [acme@felicio linux]$ ls -la ../build/perf/python/
      total 152
      -rwxrwxr-x 1 acme acme 147957 Feb  1 14:56 perf.so
      drwxrwxr-x 3 acme acme     17 Feb  1 14:56 temp
      [acme@felicio linux]$
      
      [root@felicio ~]# strip ~acme/git/build/perf/python/perf.so
      [root@felicio ~]# ls -la ~acme/git/build/perf/python/perf.so
      -rwxrwxr-x 1 acme acme 46264 Feb  1 14:58 /home/acme/git/build/perf/python/perf.so
      
      [root@felicio ~]# export PYTHONPATH=~acme/git/build/perf/python/
      [root@felicio ~]# ~acme/git/linux/tools/perf/python/twatch.py
      cpu:  0, pid: 7751, tid: 7751 { type: exit, pid: 7751, ppid: 7751, tid: 7751, ptid: 7751, time: 54562393512356}
      cpu:  0, pid: 13700, tid: 13700 { type: fork, pid: 7756, ppid: 13700, tid: 7756, ptid: 13700, time: 54562393746739}
      cpu:  1, pid: 7756, tid: 7756 { type: fork, pid: 7757, ppid: 7756, tid: 7757, ptid: 7756, time: 54562394246152}
      cpu:  1, pid: 7757, tid: 7757 { type: comm, pid: 7757, tid: 7757, comm: awk }
      cpu:  1, pid: 7757, tid: 7757 { type: exit, pid: 7757, ppid: 7757, tid: 7757, ptid: 7757, time: 54562395456813}
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      067187fc
  3. 01 2月, 2011 2 次提交
    • A
      perf top: Introduce slang based TUI · c0443df1
      Arnaldo Carvalho de Melo 提交于
      Disabled by default as there are features found in the stdio based one
      that aren't implemented, like live annotation, filtering knobs data
      entry.
      
      Annotation hopefully will get somehow merged with the 'perf annotate'
      code.
      
      To use it:
      
      perf top --tui
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c0443df1
    • A
      perf top: Move display agnostic routines to util/top.[ch] · 8c3e10eb
      Arnaldo Carvalho de Melo 提交于
      Paving the way for a slang browser a la 'perf report --tui'.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8c3e10eb
  4. 30 1月, 2011 1 次提交
    • A
      perf tools: Initial python binding · 877108e4
      Arnaldo Carvalho de Melo 提交于
      First clarifying that this kind of binding is not a replacement or an
      equivalent to the 'perf script' way of using python with perf.
      
      The 'perf script' way is to process events and look at a given script
      for some python function that matches the events to pass each event for
      processing.
      
      This is a python module, i.e. everything is driven from the python
      script, that merely uses "import perf" or "from perf import".
      
      perf script is focused on tracepoints, this binding is focused on profiling as
      an initial target. More work is needed to make available tracepoint specific
      variables as event variables accessible via this binding.
      
      There is one example of such usage model, in
      tools/perf/python/twatch.py, a tool to watch "cycles" events together
      with task (fork, exit) and comm perf events.
      
      For now, due to me not being able to grok how python distutils cope with
      building C extensions outside the sources dir the install target just
      builds it, I'm using it as:
      
      [root@emilia linux]# export PYTHONPATH=~acme/git/build/perf/lib.linux-x86_64-2.6/
      [root@emilia linux]# tools/perf/python/twatch.py
      cpu:  4, pid: 30126, tid: 30126 { type: mmap, pid: 30126, tid: 30126, start: 0x4, length: 0x82e9ca03, offset: 0, filename:  }
      cpu:  6, pid:   47, tid:   47 { type: mmap, pid: 47, tid: 47, start: 0x6, length: 0xbef87c36, offset: 0, filename:  }
      cpu:  1, pid:    0, tid:    0 { type: mmap, pid: 0, tid: 0, start: 0x1, length: 0x775d1904, offset: 0, filename:  }
      cpu:  7, pid:    0, tid:    0 { type: mmap, pid: 0, tid: 0, start: 0x7, length: 0xc750aeb6, offset: 0, filename:  }
      cpu:  5, pid: 2255, tid: 2255 { type: mmap, pid: 2255, tid: 2255, start: 0x5, length: 0x76669635, offset: 0, filename:  }
      cpu:  0, pid:    0, tid:    0 { type: mmap, pid: 0, tid: 0, start: 0, length: 0x6422ef6b, offset: 0, filename:  }
      cpu:  2, pid: 2255, tid: 2255 { type: mmap, pid: 2255, tid: 2255, start: 0x2, length: 0xe078757a, offset: 0, filename:  }
      cpu:  1, pid: 5769, tid: 5769 { type: fork, pid: 30127, ppid: 5769, tid: 30127, ptid: 5769, time: 103893991270534}
      cpu:  6, pid: 30127, tid: 30127 { type: comm, pid: 30127, tid: 30127, comm: ls }
      cpu:  6, pid: 30127, tid: 30127 { type: exit, pid: 30127, ppid: 30127, tid: 30127, ptid: 30127, time: 103893993273024}
      
      The first 8 mmap events in this 8 way machine are a mistery that is still being
      investigated.
      
      More of the tools/perf/util/ APIs will be exposed via this python binding as
      the need arises. For now the focus is on creating events and processing them,
      symbol resolution is an obvious next step, with tracepoint variables as a close
      second step.
      
      Cc: Clark Williams <williams@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      877108e4
  5. 28 1月, 2011 1 次提交
    • M
      perf tools: Add strfilter for general purpose string filter · 68baa431
      Masami Hiramatsu 提交于
      Add strfilter for general purpose string filter.
      
      Every filter rules are descrived by glob matching pattern and '!' prefix
      which means Logical NOT.
      
      A strfilter consists of those filter rules connected with '&' and '|'.
      
      A set of rules can be folded by using '(' and ')'.
      
      It also accepts spaces around rules and those operators.
      
      Format:
      <rule> ::= <glob-exp> | "!" <rule> | <rule> <op> <rule> | "(" <rule> ")"
      <op> ::= "&" | "|"
      
      e.g.:
      
       "(add* | del*) & *timer" filter rules pass strings which start with add
       or del and end with timer.
      
      This will be used by perf probe --filter.
      
      Changes in V2:
       - Fix to check result of strdup() and strfilter__alloc().
       - Encapsulate and simplify interfaces as like regex(3).
      
      Cc: 2nddept-manager@sdl.hitachi.co.jp
      Cc: Franck Bui-Huu <fbuihuu@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20110120141530.25915.12673.stgit@ltc236.sdl.hitachi.co.jp>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      68baa431
  6. 24 1月, 2011 1 次提交
    • A
      perf threads: Move thread_map to separate file · fd78260b
      Arnaldo Carvalho de Melo 提交于
      To untangle it from struct thread handling, that is tied to symbols, etc.
      
      Right now in the python bindings I'm working on I need just a subset of
      the util/ files, untangling it allows me to do that.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fd78260b
  7. 23 1月, 2011 2 次提交
    • A
      perf evsel: Introduce perf_evlist · 361c99a6
      Arnaldo Carvalho de Melo 提交于
      Killing two more perf wide global variables: nr_counters and evsel_list
      as a list_head.
      
      There are more operations that will need more fields in perf_evlist,
      like the pollfd for polling all the fds in a list of evsel instances.
      
      Use option->value to pass the evsel_list to parse_{events,filters}.
      
      LKML-Reference: <new-submission>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      361c99a6
    • A
      perf tools: Fix build by checking if extra warnings are supported · 065bef5a
      Arnaldo Carvalho de Melo 提交于
      The -Wstack-protector and -Wvolatile-register-var warnings, for
      instance, are not supported by gcc 3.4.6.
      
      So fix by doing the same check we already do for -fstack-protector-all.
      
      With this and the other patches in this series, perf builds unmodified
      on, for instance, RHEL4.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      065bef5a
  8. 07 1月, 2011 1 次提交
  9. 04 1月, 2011 1 次提交
    • A
      perf tools: Introduce event selectors · 69aad6f1
      Arnaldo Carvalho de Melo 提交于
      Out of ad-hoc code and global arrays with hard coded sizes.
      
      This is the first step on having a library that will be first
      used on regression tests in the 'perf test' tool.
      
      [acme@felicio linux]$ size /tmp/perf.before
         text	   data	    bss	    dec	    hex	filename
      1273776	  97384	5104416	6475576	 62cf38	/tmp/perf.before
      [acme@felicio linux]$ size /tmp/perf.new
         text	   data	    bss	    dec	    hex	filename
      1275422	  97416	1392416	2765254	 2a31c6	/tmp/perf.new
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      69aad6f1
  10. 07 12月, 2010 1 次提交
    • I
      perf makefile: Allow strong and weak functions in LIB_OBJS · b38aa896
      Ian Munsie 提交于
      When we build perf we place all of the .o files from the library files
      (util, arch/x/util, etc) into libperf.a which is then linked into perf.
      
      The problem is that the linker will by default only consider .o files
      within the .a archive if they are necessary to satisfy an unresolved
      symbol. As weak functions are not unresolved, it will not consider a .o
      file from the archive containing the strong versions of weak functions
      unless it requires it for another reason.
      
      This patch adds the --whole-archive flags to the linker when passing in
      the libperf.a file to ensure that it will consider every .o file in the
      archive, not just what it believes that it needs. The end result is that
      weak functions can now be overridden by strong variants of them in the
      libperf.a file.
      
      Cc: "tom.leiming" <tom.leiming@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <1290991642-sup-5890@au1.ibm.com>
      Signed-off-by: NIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b38aa896
  11. 26 11月, 2010 1 次提交
    • H
      perf bench: Add feature that measures the performance of the... · ea7872b9
      Hitoshi Mitake 提交于
      perf bench: Add feature that measures the performance of the arch/x86/lib/memcpy_64.S memcpy routines via 'perf bench mem'
      
      This patch ports arch/x86/lib/memcpy_64.S to perf bench mem
      memcpy for benchmarking memcpy() in userland with tricky and
      dirty way.
      
      util/include/asm/cpufeature.h, util/include/asm/dwarf2.h, and
      util/include/linux/linkage.h are mostly dummy files with small
      wrappers, so that we are able to include memcpy_64.S
      unmodified.
      Signed-off-by: NHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: h.mitake@gmail.com
      Cc: Miao Xie <miaox@cn.fujitsu.com>
      Cc: Ma Ling <ling.ma@intel.com>
      Cc: Zhao Yakui <yakui.zhao@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      LKML-Reference: <1290668693-27068-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ea7872b9
  12. 20 11月, 2010 1 次提交
    • R
      perf tools: Remove hardcoded include paths for elfutils · a7112397
      Robert Morell 提交于
      This change removes the use of hardcoded absolute "/usr/include/elfutils" paths
      from the perf build.  The problem with hardcoded paths is that it prevents them
      from being overridden by $prefix or by -I in CFLAGS (e.g., for cross-compiling
      purposes).
      
      Instead, just include the "elfutils/" subdirectory as a relative path when
      files are needed from that directory.
      
      Tested by building perf:
      - Cross-compiled for ARM on x86_64
      - Built natively on x86_64
      - Built on x86_64 with /usr/include/elfutils moved to another location
        and manually included in CFLAGS
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      LKML-Reference: <1289945793-31441-1-git-send-email-rmorell@nvidia.com>
      Signed-off-by: NRobert Morell <rmorell@nvidia.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a7112397
  13. 17 11月, 2010 1 次提交
  14. 04 10月, 2010 1 次提交
  15. 26 8月, 2010 1 次提交
  16. 21 8月, 2010 1 次提交
  17. 19 8月, 2010 1 次提交
    • K
      perf tools: Fix build error on read only source. · ecafda60
      Kusanagi Kouichi 提交于
      Parts of the build process were generating files outside the specified
      O= directory, causing the build to fail on systems where the sources are
      in a read only file system.
      
      Fix it by using $(OUTPUT) on these locations.
      
      Also check that $(OUTPUT) actually exists, just like the top level
      kernel Makefile does. Otherwise the failure message emitted is
      completely misleading.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <20100817140841.0859362C03A@msa106.auone-net.jp>
      Signed-off-by: NKusanagi Kouichi <slash@ac.auone-net.jp>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ecafda60
  18. 17 8月, 2010 1 次提交
  19. 11 8月, 2010 6 次提交
  20. 07 8月, 2010 1 次提交
  21. 23 7月, 2010 1 次提交
  22. 02 7月, 2010 1 次提交
  23. 18 6月, 2010 1 次提交
  24. 10 6月, 2010 1 次提交
    • A
      perf tools: Reorganize the Makefile feature tests · f9af3a4c
      Arnaldo Carvalho de Melo 提交于
      Moving the tests to a separate file, feature-tests.mak and using a try-cc
      function similar to the try-run in Kbuild.
      
      This also makes the output more quiet as we can stop using the INTERMEDIATE
      target to remove the .perf.dev.null file needed for some gcc versions where
      /dev/null can't be used as the output file name.
      
      As the tests get shorter by uninlining the source code used to test for
      features, we can more properly use identation.
      
      The feature tests itself can be made more clear and reused, like when trying to
      see what is needed to have bfd_demangle.
      
      We also get a bit closer to reusing scripts/Kbuild.include, reducing the
      distance from the kernel build system.
      
      Tests performed:
      
      [root@emilia perf]# make -j9 O=/tmp/perf
      PERF_VERSION = 0.0.2.PERF
          GEN /tmp/perf/common-cmds.h
          * new build flags or prefix
          GEN perf-archive
          CC /tmp/perf/builtin-annotate.o
          CC /tmp/perf/bench/sched-messaging.o
          CC /tmp/perf/builtin-diff.o
      <SNIP>
          CC /tmp/perf/scripts/python/Perf-Trace-Util/Context.o
          CC /tmp/perf/perf.o
          CC /tmp/perf/builtin-help.o
          AR /tmp/perf/libperf.a
          LINK /tmp/perf/perf
      [root@emilia perf]#
      
      If we uninstall, for instance newt-devel we get:
      
      [root@emilia perf]# rpm -e newt-devel
      [root@emilia perf]# make -j9 O=/tmp/perf
      Makefile:564: newt not found, disables TUI support. Please install newt-devel or libnewt-dev
          * new build flags or prefix
          GEN perf-archive
          CC /tmp/perf/perf.o
          CC /tmp/perf/builtin-annotate.o
      <SNIP>
          AR /tmp/perf/libperf.a
          LINK /tmp/perf/perf
      [root@emilia perf]#
      
      And then binutils-devel:
      
      [root@emilia perf]# make -j9 O=/tmp/perf
      Makefile:564: newt not found, disables TUI support. Please install newt-devel or libnewt-dev
      Makefile:632: No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling
          * new build flags or prefix
          GEN perf-archive
          CC /tmp/perf/perf.o
      <SNIP>
          AR /tmp/perf/libperf.a
          LINK /tmp/perf/perf
      [root@emilia perf]#
      
      And then strictly required devel packages:
      
      [root@emilia perf]# rpm -e elfutils-libelf-devel elfutils-devel
      [root@emilia perf]# make -j9 O=/tmp/perf
      Makefile:509: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev
      Makefile:542: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel.  Stop.
      [root@emilia perf]#
      
      After installing everything back on:
      
      [root@emilia perf]# yum install elfutils-devel binutils-devel newt-devel
      <SNIP>
      Installed:
        binutils-devel.x86_64 0:2.20.51.0.2-5.11.el6
        elfutils-devel.x86_64 0:0.147-1.el6
        elfutils-libelf-devel.x86_64 0:0.147-1.el6
        newt-devel.x86_64 0:0.52.11-1.el6
      
      Complete!
      [root@emilia perf]# make -j9
      PERF_VERSION = 0.0.2.PERF
          GEN common-cmds.h
          * new build flags or prefix
          GEN perf-archive
          CC builtin-annotate.o
      <SNIP>
          AR libperf.a
          LINK perf
      [root@emilia perf]# make -j9
      [root@emilia perf]#
      
      Thanks to Sam for pointing me to try-run.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f9af3a4c
  25. 18 5月, 2010 2 次提交
  26. 15 5月, 2010 1 次提交
    • A
      perf newt: Make <- zoom out filters · 3e1bbdc3
      Arnaldo Carvalho de Melo 提交于
      After we use the filters to zoom into DSOs or threads, we can use <-
      (left arrow) to zoom out from the last filter applied.
      
      It is still possible to zoom out of order by using the popup menu.
      
      With this we now have the zoom out operation on the browsing fast path,
      by allowing fast navigation using just the four arrors and the enter key
      to expand collapse callchains.
      Suggested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3e1bbdc3
  27. 12 5月, 2010 1 次提交
    • A
      perf report: Librarize the annotation code and use it in the newt browser · ef7b93a1
      Arnaldo Carvalho de Melo 提交于
      Now we don't anymore use popen to run 'perf annotate' for the selected
      symbol, instead we collect per address samplings when processing samples
      in 'perf report' if we're using the newt browser, then we use this data
      directly to do annotation.
      
      Done this way we can actually traverse the objdump_line objects
      directly, matching the addresses to the collected samples and colouring
      them appropriately using lower level slang routines.
      
      The new ui_browser class will be reused for the main, callchain aware,
      histogram browser, when it will be made generic and don't assume that
      the objects are always instances of the objdump_line class maintained
      using list_heads.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ef7b93a1
  28. 11 5月, 2010 2 次提交
  29. 03 5月, 2010 1 次提交
    • T
      perf: add perf-inject builtin · 454c407e
      Tom Zanussi 提交于
      Currently, perf 'live mode' writes build-ids at the end of the
      session, which isn't actually useful for processing live mode events.
      
      What would be better would be to have the build-ids sent before any of
      the samples that reference them, which can be done by processing the
      event stream and retrieving the build-ids on the first hit.  Doing
      that in perf-record itself, however, is off-limits.
      
      This patch introduces perf-inject, which does the same job while
      leaving perf-record untouched.  Normal mode perf still records the
      build-ids at the end of the session as it should, but for live mode,
      perf-inject can be injected in between the record and report steps
      e.g.:
      
      perf record -o - ./hackbench 10 | perf inject -v -b | perf report -v -i -
      
      perf-inject reads a perf-record event stream and repipes it to stdout.
      At any point the processing code can inject other events into the
      event stream - in this case build-ids (-b option) are read and
      injected as needed into the event stream.
      
      Build-ids are just the first user of perf-inject - potentially
      anything that needs userspace processing to augment the trace stream
      with additional information could make use of this facility.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1272696080-16435-3-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      454c407e