1. 08 Nov, 2012 4 commits
  2. 05 Nov, 2012 18 commits
  3. 01 Nov, 2012 10 commits
  4. 31 Oct, 2012 8 commits
    • Jiri Olsa's avatar
      perf tests: Add framework for automated perf_event_attr tests · 52502bf2
      Jiri Olsa authored
      The idea is run perf session with kidnapping sys_perf_event_open
      function. For each sys_perf_event_open call we store the perf_event_attr
      data to the file to be checked later against what we expect.
      
      You can run this by:
        $ python ./tests/attr.py -d ./tests/attr/ -p ./perf -v
      
      v2 changes:
        - preserve errno value in the hook
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.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/20121031145247.GB1027@krava.brq.redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      52502bf2
    • Jiri Olsa's avatar
      perf tests: Move test objects into 'tests' directory · 945aea22
      Jiri Olsa authored
      Separating test objects into 'tests' directory.
      Signed-off-by: default avatarJiri 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: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1351634526-1516-3-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      945aea22
    • Feng Tang's avatar
      perf browser: Don't show scripts menu for 'perf top' · c77d8d70
      Feng Tang authored
      As 'perf top' has no data files to run scripts against. Also add a
      is_report_browser() helper function to judge whether the running browser
      is for 'perf report'.
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1351699257-5102-1-git-send-email-feng.tang@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c77d8d70
    • Jiri Olsa's avatar
      perf tools: Remove BINDIR define from exec_cmd.o compilation · dc53eda5
      Jiri Olsa authored
      It's not needed.
      Signed-off-by: default avatarJiri 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: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1351634526-1516-2-git-send-email-jolsa@redhat.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dc53eda5
    • Andi Kleen's avatar
      perf annotate: Handle XBEGIN like a jump · ffadcf09
      Andi Kleen authored
      So that the browser still shows the abort label.
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.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>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1351643663-23828-18-git-send-email-andi@firstfloor.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ffadcf09
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Handle --version string generation on machines without git · 688b2c2f
      Arnaldo Carvalho de Melo authored
      If git is installed we'll have a 'perf --version' output of this form:
      
      $ make -j8 -C tools/perf/ O=/home/acme/git/build/perf install
      $ perf --version
      perf version 3.7.rc3.g3afad6
      
      Now on a machine without git installed:
      
      $ mv  /home/acme/bin/git /home/acme/bin/git.OFF
      $ make -j8 -C tools/perf/ O=/home/acme/git/build/perf install
      $ perf --version
      perf version 3.7.0-rc2
      
      That is, no error message due to git not being installed will appear on the
      screen and instead the version string in the top level Makefile will be
      used.
      Requested-by: default avatarIngo Molnar <mingo@kernel.org>
      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-am6yp6phvxyjmyndxogpunjv@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      688b2c2f
    • Ingo Molnar's avatar
      perf tools: Further speed up the perf build · 0e2af956
      Ingo Molnar authored
      There's another source of overhead in the perf version string generator:
      
         git update-index -q --refresh
      
      ... which will iterate the whole checked out tree. This can be pretty
      slow on NFS volumes, but takes some time even with local SSD disks and a
      fully cached kernel tree:
      
       $ perf stat --null --repeat 3 --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
       PERF_VERSION = 3.7.rc3.g5399b3b.dirty
       PERF_VERSION = 3.7.rc3.g5399b3b.dirty
       PERF_VERSION = 3.7.rc3.g5399b3b.dirty
      
       Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):
      
             0.306999221 seconds time elapsed                                          ( +-  0.56% )
      
      So remove the .dirty differentiator as well - it adds little information
      because locally patched git trees are common, but seldom are the perf
      tools modified.
      
      So a lot of version strings are reported as 'dirty' while in fact they
      are pristine perf builds. For example 99% of my perf builds are not
      patched but the kernel tree is slightly patched, which adds the .dirty
      tag.
      
      Eliminating that tag speeds up version generation by another order of
      magnitude:
      
       $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
       PERF_VERSION = 3.7.rc3.g4b0bd3
       PERF_VERSION = 3.7.rc3.g4b0bd3
       PERF_VERSION = 3.7.rc3.g4b0bd3
      
       Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):
      
             0.021270923 seconds time elapsed                                          ( +-  1.94% )
      
      (Also clean up some of the comments around this code.)
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Andrew Vagin <avagin@openvz.org>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/20121030085441.GC8245@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0e2af956
    • Ingo Molnar's avatar
      perf tools: Speed up the perf build time by simplifying the perf --version string generation · acddedfb
      Ingo Molnar authored
      Building perf is pretty slow on trees that have a lot of commits
      relative to the nearest Git tag. This slowness manifests itself during
      version string generation:
      
       $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
       PERF_VERSION = 3.7.rc3.1458.g5399b3b
       PERF_VERSION = 3.7.rc3.1458.g5399b3b
       PERF_VERSION = 3.7.rc3.1458.g5399b3b
      
       Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):
      
             2.857503976 seconds time elapsed                                          ( +-  0.22% )
      
      The build can be even slower than that, when one over NFS volumes.
      
      The reason for the slowness is that util/PERF-VERSION-GEN uses "git
      describe" to generate the string, which has to count the "number of
      commits distance" from the nearest tag - the ".1458." count in the
      output above. For that Git had to extract and decompress 1458 Git
      objects, which takes time and bandwidth.
      
      But this "number of commits" value is mostly irrelevant in practice. We
      either want to know an approximate tag name, or we want to know the
      precise sha1.
      
      So this patch simplifies the version string to:
      
       PERF_VERSION = 3.7.rc3.g5399b3b.dirty
      
      which speeds up the version string generation script by an order of
      magnitude:
      
       $ perf stat --null --repeat 3 --sync --pre "rm -f PERF-VERSION-FILE" util/PERF-VERSION-GEN
       PERF_VERSION = 3.7.rc3.g5399b3b.dirty
       PERF_VERSION = 3.7.rc3.g5399b3b.dirty
       PERF_VERSION = 3.7.rc3.g5399b3b.dirty
      
       Performance counter stats for 'util/PERF-VERSION-GEN' (3 runs):
      
             0.307633559 seconds time elapsed                                          ( +-  0.84% )
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Cc: Andrew Vagin <avagin@openvz.org>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/20121030084600.GB8245@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      acddedfb