1. 19 4月, 2010 1 次提交
  2. 10 4月, 2010 1 次提交
  3. 03 4月, 2010 4 次提交
  4. 23 3月, 2010 2 次提交
  5. 12 3月, 2010 1 次提交
    • A
      perf report: Implement initial UI using newt · f9224c5c
      Arnaldo Carvalho de Melo 提交于
      Newt has widespread availability and provides a rather simple
      API as can be seen by the size of this patch.
      
      The work needed to support it will benefit other frontends too.
      
      In this initial patch it just checks if the output is a tty, if
      not it falls back to the previous behaviour, also if
      newt-devel/libnewt-dev is not installed the previous behaviour
      is maintaned.
      
      Pressing enter on a symbol will annotate it, ESC in the
      annotation window will return to the report symbol list.
      
      More work will be done to remove the special casing in
      color_fprintf, stop using fmemopen/FILE in the printing of
      hist_entries, etc.
      
      Also the annotation doesn't need to be done via spawning "perf
      annotate" and then browsing its output, we can do better by
      calling directly the builtin-annotate.c functions, that would
      then be moved to tools/perf/util/annotate.c and shared with perf
      top, etc
      
      But lets go by baby steps, this patch already improves perf
      usability by allowing to quickly do annotations on symbols from
      the report screen and provides a first experimentation with
      libnewt/TUI integration of tools.
      
      Tested on RHEL5 and Fedora12 X86_64 and on Debian PARISC64 to
      browse a perf.data file collected on a Fedora12 x86_64 box.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1268349164-5822-5-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f9224c5c
  6. 11 3月, 2010 2 次提交
    • J
      perf: Make the install relative to DESTDIR if specified · 7ae5f213
      John Kacur 提交于
      Without this change, the install path is relative to
      prefix/DESTDIR where prefix is automatically set to $HOME.
      
      This can produce unexpected results. For example:
      
        make -C tools/perf DESTDIR=/home/jkacur/tmp install-man
      
      creates the directory:		/home/jkacur/home/jkacur/tmp/share/...
      instead of the expected:	/home/jkacur/tmp/share/...
      Signed-off-by: NJohn Kacur <jkacur@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Kyle McMartin <kyle@redhat.com>
      Cc: <stable@kernel.org>
      LKML-Reference: <1268312220-12880-1-git-send-email-jkacur@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7ae5f213
    • P
      perf tools: Fix sparse CPU numbering related bugs · a12b51c4
      Paul Mackerras 提交于
      At present, the perf subcommands that do system-wide monitoring
      (perf stat, perf record and perf top) don't work properly unless
      the online cpus are numbered 0, 1, ..., N-1.  These tools ask
      for the number of online cpus with sysconf(_SC_NPROCESSORS_ONLN)
      and then try to create events for cpus 0, 1, ..., N-1.
      
      This creates problems for systems where the online cpus are
      numbered sparsely.  For example, a POWER6 system in
      single-threaded mode (i.e. only running 1 hardware thread per
      core) will have only even-numbered cpus online.
      
      This fixes the problem by reading the /sys/devices/system/cpu/online
      file to find out which cpus are online.  The code that does that is in
      tools/perf/util/cpumap.[ch], and consists of a read_cpu_map()
      function that sets up a cpumap[] array and returns the number of
      online cpus.  If /sys/devices/system/cpu/online can't be read or
      can't be parsed successfully, it falls back to using sysconf to
      ask how many cpus are online and sets up an identity map in cpumap[].
      
      The perf record, perf stat and perf top code then calls
      read_cpu_map() in the system-wide monitoring case (instead of
      sysconf) and uses cpumap[] to get the cpu numbers to pass to
      perf_event_open.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      LKML-Reference: <20100310093609.GA3959@brick.ozlabs.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a12b51c4
  7. 26 2月, 2010 1 次提交
    • M
      perf probe: Use elfutils-libdw for analyzing debuginfo · 804b3606
      Masami Hiramatsu 提交于
      Newer gcc introduces newer & richer debuginfo, and only libdw
      in elfutils project can support it. So perf probe moves onto
      elfutils-libdw from libdwarf.
      
      Changes in v3:
       - Cast Dwarf_Addr/Dwarf_Word to uintmax_t for printf-formats.
       - Recover a sign-prefix which was removed in v2 by mistake.
      
      Changes in v2:
       - Fix a type-casting bug in Makefile.
       - Cast Dwarf_Addr/Dwarf_Word to unsigned long long for printf-formats.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      LKML-Reference: <20100225133542.6725.34724.stgit@localhost6.localdomain6>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      804b3606
  8. 25 2月, 2010 2 次提交
    • T
      perf/scripts: Add syscall tracing scripts · 4d161f03
      Tom Zanussi 提交于
      Adds a set of scripts that aggregate system call totals and system
      call errors.  Most are Python scripts that also test basic
      functionality of the new Python engine, but there's also one Perl
      script added for comparison and for reference in some new
      Documentation contained in a later patch.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1264580883-15324-8-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      4d161f03
    • T
      perf/scripts: Add Python scripting engine · 7e4b21b8
      Tom Zanussi 提交于
      Add base support for Python scripting to perf trace.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1264580883-15324-6-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      7e4b21b8
  9. 24 2月, 2010 1 次提交
    • T
      perf/scripts: Move Perl scripting files to scripting-engines dir · 82d156cd
      Tom Zanussi 提交于
      Create a scripting-engines directory to contain scripting engine
      implementation code, in anticipation of the addition of new scripting
      support.  Also removes trace-event-perl.h.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1264580883-15324-5-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      82d156cd
  10. 04 2月, 2010 1 次提交
  11. 31 1月, 2010 2 次提交
  12. 21 1月, 2010 1 次提交
    • A
      perf buildid-cache: Add new command to manage build-id cache · ef12a141
      Arnaldo Carvalho de Melo 提交于
      For now it just has operations to examine a given file, find its
      build-id and add or remove it to/from the cache.
      
      Useful, for instance, when adding binaries sent together with a
      perf.data file, so that we can add them to the cache and have
      the tools find it when resolving symbols.
      
      It'll also manage the size of the cache like 'ccache' does.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1264008525-29025-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ef12a141
  13. 20 1月, 2010 1 次提交
  14. 16 1月, 2010 1 次提交
    • A
      perf archive: Add helper script to package files needed to do analysis · 2c585174
      Arnaldo Carvalho de Melo 提交于
      It uses 'perf buildid-list --with-hits' to create a tarball with
      what is needed to have in the destination machine ~/.debug
      hierarchy to properly decode the perf.data file specified.
      
      Here is an example where a perf.data file collected on a x86-64
      machine running Fedora 12 is used and then the data is packaged,
      transferred and decoded on a PARISC64 machine running Debian
      Testing, 32-bit userspace:
      
      [root@doppio linux-2.6-tip]# uname -a
      Linux doppio.ghostprotocols.net 2.6.33-rc4-tip+ #3 SMP Wed Jan 13 11:58:15 BRST 2010 x86_64 x86_64 x86_64 GNU/Linux
      [root@doppio linux-2.6-tip]# perf archive
      [root@doppio linux-2.6-tip]# ls -la perf.data*
      -rw------- 1 root root  737696 2010-01-14 23:36 perf.data
      -rw-r--r-- 1 root root 8840025 2010-01-15 12:27 perf.data.tar.bz2
      [root@doppio linux-2.6-tip]# scp perf.data.* parisc64:.
      Password:
      perf.data.tar.bz2                                      100% 8633KB   1.4MB/s   00:06
      [root@doppio linux-2.6-tip]# ssh parisc64
      Password:
      Linux parisc 2.6.19-g2bbf29ac-dirty #1 Sun Dec 3 17:24:04 BRST 2006 parisc64
      
      The programs included with the Debian GNU/Linux system are free software;
      the exact distribution terms for each program are described in the
      individual files in /usr/share/doc/*/copyright.
      
      Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
      permitted by applicable law.
      Last login: Thu Jan 14 11:23:24 2010 from d
      parisc:~# uname -a
      Linux parisc 2.6.19-g2bbf29ac-dirty #1 Sun Dec 3 17:24:04 BRST 2006 parisc64 GNU/Linux
      parisc:~# mkdir .debug
      parisc:~# tar xvf perf.data.tar.bz2 -C ~/.debug
      tar: Record size = 8 blocks
      .build-id/74/f9930ee94475b6b3238caf3725a50d59cb994b
      [kernel.kallsyms]/74f9930ee94475b6b3238caf3725a50d59cb994b
      .build-id/9f/fdcac0a7935922d1f04b6cc9029dfef0f066ef
      lib/modules/2.6.33-rc4-tip+/kernel/arch/x86/crypto/aes-x86_64.ko/9ffdcac0a7935922d1f04b6cc9029dfef0f066ef
      .build-id/3a/af89c32ebfc438ff546c93597d41788e3e65f3
      lib/modules/2.6.33-rc4-tip+/kernel/drivers/net/wireless/iwlwifi/iwl3945.ko/3aaf89c32ebfc438ff546c93597d41788e3e65f3
      .build-id/19/f46033f73e1ec612937189bb118c5daba5a0c8
      lib/modules/2.6.33-rc4-tip+/kernel/net/mac80211/mac80211.ko/19f46033f73e1ec612937189bb118c5daba5a0c8
      .build-id/17/72f014a7a7272859655acb0c64a20ab20b75ee
      lib/modules/2.6.33-rc4-tip+/kernel/drivers/net/e1000e/e1000e.ko/1772f014a7a7272859655acb0c64a20ab20b75ee
      .build-id/eb/4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
      lib64/libc-2.10.2.so/eb4ec8fa8b2a5eb18cad173c92f27ed8887ed1c1
      .build-id/5c/68f7afeb33309c78037e374b0deee84dd441f6
      lib64/libpthread-2.10.2.so/5c68f7afeb33309c78037e374b0deee84dd441f6
      .build-id/e9/c9ad5c138ef882e4507d2605645b597da43873
      bin/dbus-daemon/e9c9ad5c138ef882e4507d2605645b597da43873
      .build-id/bc/da7d09eb6c9ee380dae0ed3d591d4311decc31
      lib64/libdbus-1.so.3.4.0/bcda7d09eb6c9ee380dae0ed3d591d4311decc31
      .build-id/7c/c449a77f48b85d6088114000e970ced613bed8
      usr/lib64/libcrypto.so.0.9.8k/7cc449a77f48b85d6088114000e970ced613bed8
      .build-id/fd/d1ccd1ff7917ab020653147ab3bacf0a85b5b9
      lib64/libglib-2.0.so.0.2000.5/fdd1ccd1ff7917ab020653147ab3bacf0a85b5b9
      .build-id/e4/417ebb8762e5f2eee93c8011a71115ff5edad8
      lib64/libgobject-2.0.so.0.2000.5/e4417ebb8762e5f2eee93c8011a71115ff5edad8
      .build-id/93/1e49461f6df99104f0febcc52f6fed5e2efce6
      usr/sbin/sshd/931e49461f6df99104f0febcc52f6fed5e2efce6
      .build-id/da/b5f724c088f89fbd8304da553ed6cb30bbec96
      usr/lib64/libgdk-x11-2.0.so.0.1600.6/dab5f724c088f89fbd8304da553ed6cb30bbec96
      .build-id/f2/037a091ef36b591187a858d75e203690ea9409
      usr/sbin/openvpn/f2037a091ef36b591187a858d75e203690ea9409
      .build-id/a8/e4f743b40fb1fd8b85e2f9b88d93b661472b8f
      bin/find/a8e4f743b40fb1fd8b85e2f9b88d93b661472b8f
      .build-id/81/120aada06e68b1e85882925a0fc6d7345ef59a
      home/acme/bin/perf/81120aada06e68b1e85882925a0fc6d7345ef59a
      parisc:~# perf report 2> /dev/null | head -25
           9.07%             find  find                               [.] 0x0000000000fb0e
           3.29%             perf  libc-2.10.2.so                     [.] __GI_strcmp
           3.19%             find  [kernel.kallsyms]                  [k] _raw_spin_unlock_irqrestore
           2.70%             find  libc-2.10.2.so                     [.] __GI_memmove
           2.62%             perf  [kernel.kallsyms]                  [k] vsnprintf
           2.03%             find  libc-2.10.2.so                     [.] _int_malloc
           2.02%             perf  [kernel.kallsyms]                  [k] format_decode
           1.70%             find  [kernel.kallsyms]                  [k] n_tty_write
           1.70%             find  [kernel.kallsyms]                  [k] half_md4_transform
           1.67%             find  libc-2.10.2.so                     [.] _IO_vfprintf_internal
           1.66%             perf  [kernel.kallsyms]                  [k] audit_free_aux
           1.62%          swapper  [kernel.kallsyms]                  [k] mwait_idle_with_hints
           1.58%             find  [kernel.kallsyms]                  [k] __kmalloc
           1.35%             find  [kernel.kallsyms]                  [k] sched_clock_local
           1.35%             find  [kernel.kallsyms]                  [k] ext4_check_dir_entry
           1.35%             find  [kernel.kallsyms]                  [k] ext4_htree_store_dirent
           1.35%             find  [kernel.kallsyms]                  [k] sys_write
           1.35%             find  [e1000e]                           [k] e1000_clean
           1.35%             find  [kernel.kallsyms]                  [k] _atomic_dec_and_lock
           1.34%             find  [kernel.kallsyms]                  [k] __d_lookup
      parisc:~#
      
      Probably the next step is to have 'perf report' notice that there is a
      perf.data.tar.bz2 file in the same directory and look if it was already
      added to ~/.debug/.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1263568672-30323-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2c585174
  15. 13 1月, 2010 2 次提交
    • A
      perf tools: Check if /dev/null can be used as the -o gcc argument · 1703f2c3
      Arnaldo Carvalho de Melo 提交于
      At least on Debian PARISC64, using:
      
      acme@parisc:~/git/linux-2.6-tip$ gcc -v
      Using built-in specs.
      Target: hppa-linux-gnu
      Configured with: ../src/configure -v --with-pkgversion='Debian
      4.3.4-6' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
      --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
      --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --enable-checking=release --build=hppa-linux-gnu --host=hppa-linux-gnu --target=hppa-linux-gnu Thread model: posix gcc version 4.3.4 (Debian 4.3.4-6)
      
      there are issues about using 'gcc -o /dev/null':
      
      /usr/bin/ld: final link failed: File truncated
      collect2: ld returned 1 exit status
      
      So we test that and use /dev/null in environments where it
      works, while using an .INTERMEDIATE file on those where it can't
      be used, so that the .perf.dev.null file can be used instead and
      then deleted when make exits.
      
      Researched-with: Kyle McMartin <kyle@mcmartin.ca>
      Researched-with: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1263293910-8484-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1703f2c3
    • A
      perf tools: Move QUIET_STDERR def to before first use · 83039518
      Arnaldo Carvalho de Melo 提交于
      QUIET_STDERR is used when detecting if -fstack-protector-all can
      be used.
      
      Noticed while building the perf tools on a Debian PARISC64
      machine.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1263293910-8484-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      83039518
  16. 28 12月, 2009 4 次提交
    • A
      perf record: Introduce a symtab cache · 4cf40131
      Arnaldo Carvalho de Melo 提交于
      Now a cache will be created in a ~/.debug debuginfo like
      hierarchy, so that at the end of a 'perf record' session all the
      binaries (with build-ids) involved get collected and indexed by
      their build-ids, so that perf report can find them.
      
      This is interesting when developing software where you want to
      do a 'perf diff' with the previous build and opens avenues for
      lots more interesting tools, like a 'perf diff --graph' that
      takes more than two binaries into account.
      
      Tunables for collecting just the symtabs can be added if one
      doesn't want to have the full binary, but having the full binary
      allows things like 'perf rerecord' or other tools that can
      re-run the tests by having access to the exact binary in some
      perf.data file, so it may well be interesting to keep the full
      binary there.
      
      Space consumption is minimised by trying to use hard links, a
      'perf cache' tool to manage the space used, a la ccache is
      required to purge older entries.
      
      With this in place it will be possible also to introduce new
      commands, 'perf archive' and 'perf restore' (or some more
      suitable and future proof names) to create a cpio/tar file with
      the perf data and the files in the cache that _had_ perf hits of
      interest.
      
      There are more aspects to polish, like finding the right vmlinux
      file to cache, etc, but this is enough for a first step.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1261957026-15580-10-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4cf40131
    • A
      perf tools: Move the map class definition to a separate header · 4a58e611
      Arnaldo Carvalho de Melo 提交于
      And this resulted in the need for adding some missing includes
      in some places that were getting the definitions needed out of
      sheer luck.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1261957026-15580-4-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4a58e611
    • A
      perf session: Move the event processing routines to session.c · 06aae590
      Arnaldo Carvalho de Melo 提交于
      No need for an extra "data_map" file since the routines there
      operate mainly on a perf_session instance.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1261957026-15580-3-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      06aae590
    • A
      perf tools: Add missing header files to LIB_H Makefile variable · 049ae80b
      Arnaldo Carvalho de Melo 提交于
      So that changes in them trigger rebuilds, like when we're doing
      bisects.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1261957026-15580-2-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      049ae80b
  17. 17 12月, 2009 1 次提交
    • M
      perf probe: Fix libdwarf include path for Debian · 27f3b24d
      Masami Hiramatsu 提交于
      Fix libdwarf include path to fit debian-like systems too.
      
      Borislav Petkov reported:
      
      > even after installing libdwarf-dev on my debian box here,
      > make in tools/perf/ still complains that it cannot find libdwarf:
      >
      > Makefile:491: No libdwarf.h found or old libdwarf.h found, disables dwarf
      > support. Please install libdwarf-dev/libdwarf-devel >= 20081231
      >
      > The problem is that the include path on debian is not
      > /usr/include/libdwarf/ but simply /usr/include because the debian
      > package libdwarf-dev puts the headers straight into
      > /usr/include.
      
      This patch adds -I/usr/include/libdwarf to BASIC_CFLAGS
      and fix probe-finder.h to include just libdwarf.h/dwarf.h.
      
      This patch also adds a workaround for the undefined _MIPS_SZLONG
      bug in libdwarf.h.
      Reported-by: NBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Gabor Gombas <gombasg@sztaki.hu>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      LKML-Reference: <20091216221618.13816.83296.stgit@dhcp-100-2-132.bos.redhat.com>
      [ v2: small stylistic fixlets to probe-finder.h ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      27f3b24d
  18. 15 12月, 2009 2 次提交
    • T
      perf trace/scripting: Don't install unneeded files · a3a7cb7b
      Tom Zanussi 提交于
      README and Makefile.PL don't need to be installed for Perl
      run-time support.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      LKML-Reference: <1260867220-15699-3-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a3a7cb7b
    • A
      perf diff: Introduce tool to show performance difference · 86a9eee0
      Arnaldo Carvalho de Melo 提交于
      I guess it is enough to show some examples:
      
      [root@doppio linux-2.6-tip]# rm -f perf.data*
      [root@doppio linux-2.6-tip]# ls -la perf.data*
      ls: cannot access perf.data*: No such file or directory
      [root@doppio linux-2.6-tip]# perf record -f find / > /dev/null
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.062 MB perf.data (~2699 samples) ]
      [root@doppio linux-2.6-tip]# ls -la perf.data*
      -rw------- 1 root root 74440 2009-12-14 20:03 perf.data
      [root@doppio linux-2.6-tip]# perf record -f find / > /dev/null
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.062 MB perf.data (~2692 samples) ]
      [root@doppio linux-2.6-tip]# ls -la perf.data*
      -rw------- 1 root root 74280 2009-12-14 20:03 perf.data
      -rw------- 1 root root 74440 2009-12-14 20:03 perf.data.old
      [root@doppio linux-2.6-tip]# perf diff | head -5
         1        -34994580     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2        -15307806         [kernel.kallsyms]   __kmalloc
         3    +1   +3665941     /lib64/libc-2.10.1.so   __GI_memmove
         4    +4  +23508995     /lib64/libc-2.10.1.so   _int_malloc
         5    +7  +38538813         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]# perf diff -p | head -5
         1        +1.00%     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2                       [kernel.kallsyms]   __kmalloc
         3    +1             /lib64/libc-2.10.1.so   __GI_memmove
         4    +4             /lib64/libc-2.10.1.so   _int_malloc
         5    +7  -1.00%         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]# perf diff -v | head -5
         1        361449551 326454971 -34994580     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2        151009241 135701435 -15307806         [kernel.kallsyms]   __kmalloc
         3    +1  101805328 105471269  +3665941     /lib64/libc-2.10.1.so   __GI_memmove
         4    +4   78041440 101550435 +23508995     /lib64/libc-2.10.1.so   _int_malloc
         5    +7   59536172  98074985 +38538813         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]# perf diff -vp | head -5
         1        9.00% 8.00% +1.00%     /lib64/libc-2.10.1.so   _IO_vfprintf_internal
         2        3.00% 3.00%                [kernel.kallsyms]   __kmalloc
         3    +1  2.00% 2.00%            /lib64/libc-2.10.1.so   __GI_memmove
         4    +4  2.00% 2.00%            /lib64/libc-2.10.1.so   _int_malloc
         5    +7  1.00% 2.00% -1.00%         [kernel.kallsyms]   __d_lookup
      [root@doppio linux-2.6-tip]#
      
      This should be enough for diffs where the system is non
      volatile, i.e. when one doesn't updates binaries.
      
      For volatile environments, stay tuned for the next perf tool
      feature: a buildid cache populated by 'perf record', managed by
      'perf buildid-cache' a-la ccache, and used by all the report
      tools.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      LKML-Reference: <1260828571-3613-3-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      86a9eee0
  19. 14 12月, 2009 1 次提交
  20. 12 12月, 2009 1 次提交
    • A
      perf tools: Introduce perf_session class · 94c744b6
      Arnaldo Carvalho de Melo 提交于
      That does all the initialization boilerplate, opening the file,
      reading the header, checking if it is valid, etc.
      
      And that will as well have the threads list, kmap (now) global
      variable, etc, so that we can handle two (or more) perf.data files
      describing sessions to compare.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1260573842-19720-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      94c744b6
  21. 11 12月, 2009 1 次提交
    • J
      perf tools: Allow cross compiling · cc835752
      Jamie Iles 提交于
      For embedded platforms, we want to be able to build the perf
      tools on a build machine to run on a different arch. This patch
      allows $CROSS_COMPILE to set the cross compiler.
      
      Additionally, if NO_LIBPERL is set, then don't use perl include
      paths as they will be for the host arch.
      Signed-off-by: NJamie Iles <jamie.iles@picochip.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <1260523260-15694-2-git-send-email-jamie.iles@picochip.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cc835752
  22. 01 12月, 2009 2 次提交
    • M
      perf probe: Move probe event utility functions to probe-event.c · 50656eec
      Masami Hiramatsu 提交于
      Split probe event (kprobe-events and perf probe events) utility
      functions from builtin-probe.c to probe-event.c.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001958.10235.90243.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      50656eec
    • M
      perf probe: Add probe-finder.h without libdwarf · 57d250df
      Masami Hiramatsu 提交于
      Add probe-finder.h as LIB_H without libdwarf, because that
      header is included even if no libdwarf.
      Signed-off-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001934.10235.44656.stgit@harusame>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      57d250df
  23. 30 11月, 2009 2 次提交
  24. 28 11月, 2009 3 次提交
    • T
      perf trace: Add interface to access perf data from Perl handlers · d1b93772
      Tom Zanussi 提交于
      The Perl scripting support for perf trace allows most of a trace
      event's data to be accessed directly as handler arguments, but
      not all of it e.g. the less common fields aren't passed in.  To
      give scripts access to the other fields and/or any other data or
      metadata in the main perf executable that might be useful, a way
      to access the C data in perf from Perl is needed; this patch
      uses the Perl XS facility to do it for the common_xxx event
      fields not passed to handler functions.
      
      Context.pm exports three functions to Perl scripts that access
      fields for the current event by calling back into perf:
      common_pc(), common_flags() and common_lock_depth().  Support
      for common_flags() field values was added to Core.pm and a
      script used to sanity check these and other basic scripting
      features, check-perf-trace.pl, was also added.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: anton@samba.org
      Cc: hch@infradead.org
      LKML-Reference: <1259133352-23685-6-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d1b93772
    • T
      perf trace: Add perf trace scripting support modules for Perl · bcefe12e
      Tom Zanussi 提交于
      Add Perf-Trace-Util Perl module and some scripts that use it.
      Core.pm contains Perl code to define and access flag and
      symbolic fields. Util.pm contains general-purpose utility
      functions.
      
      Also adds some makefile bits to install them in
      libexec/perf-core/scripts/perl (or wherever perfexec_instdir
      points).
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: anton@samba.org
      Cc: hch@infradead.org
      LKML-Reference: <1259133352-23685-5-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bcefe12e
    • T
      perf trace: Add Perl scripting support · 16c632de
      Tom Zanussi 提交于
      Implement trace_scripting_ops to make Perl a supported perf
      trace scripting language.
      
      Additionally adds code that allows Perl trace scripts to access
      the 'flag' and 'symbolic' (__print_flags(), __print_symbolic())
      field information parsed from the trace format files.
      
      Also adds the Perl implementation of the generate_script()
      trace_scripting_op, which creates a ready-to-run perf trace Perl
      script based on existing trace data.  Scripts generated by this
      implementation print out all the fields for each event mentioned
      in perf.data (and will detect and generate the proper scripting
      code for 'flag' and 'symbolic' fields), and will additionally
      generate handlers for the special 'trace_unhandled',
      'trace_begin' and 'trace_end' handlers.  Script authors can
      simply remove the printing code to implement their own custom
      event handling.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: fweisbec@gmail.com
      Cc: rostedt@goodmis.org
      Cc: anton@samba.org
      Cc: hch@infradead.org
      LKML-Reference: <1259133352-23685-4-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      16c632de