1. 01 Mar, 2011 2 commits
    • Arnaldo Carvalho de Melo's avatar
      perf tui: Make ui__warning modal · a1ceb741
      Arnaldo Carvalho de Melo authored
      By taking the ui__lock so that no other screen updates take place while
      waiting for the user.
      
      That was happening when handling an invalid --vmlinux parameter in 'perf
      top --tui', with the screen refresh routine repainting the screen and
      removing the warning window.
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a1ceb741
    • Arnaldo Carvalho de Melo's avatar
      perf top browser: Handle empty active symbols list · 3166fc8f
      Arnaldo Carvalho de Melo authored
      Fixing a SEGV. An empty list could happen when not being able to resolve
      symbols, for instance when --vmlinux invalid-file is used.
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3166fc8f
  2. 25 Feb, 2011 2 commits
    • Arnaldo Carvalho de Melo's avatar
      perf ui browser: Introduce ui_browser__show_title · b210b3bb
      Arnaldo Carvalho de Melo authored
      Needed because we were only showing the title in ui_browser__show,
      not in ui_browser__run, and in the run loop we may be calling other
      browsers that would then change the title, when we go back to the
      previous browser, we need to redraw the title.
      
      We could have done this as the Newt help line, with pop, etc, but I
      don't think its worth, doing it explicitely, when needed (some browsers
      may not use the title area at all) seems enough/more flexible.
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b210b3bb
    • Arnaldo Carvalho de Melo's avatar
      perf top browser: Fix up exit keys · c16bfe9a
      Arnaldo Carvalho de Melo authored
      The left key was exiting 'perf top --tui' when it really shouldn't, it
      was too easy to leave the live annotation window and then press one too
      many <- and get out of the tool altogether.
      
      Do just like the report TUI does, ignore the left key for exit and also
      ask the user when pressing ESC if that is really what is wanted.
      Reported-by: default avatarMike Galbraith <efault@gmx.de>
      Suggested-by: default avatarIngo 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c16bfe9a
  3. 23 Feb, 2011 6 commits
  4. 22 Feb, 2011 4 commits
    • Arnaldo Carvalho de Melo's avatar
      perf top: Live TUI Annotation · c97cf422
      Arnaldo Carvalho de Melo authored
      Now one has just to press the right key, 'a' or Enter on the main 'perf
      top --tui' screen to live annotate the symbol under the cursor.
      
      The annotate window starts centered on the hottest line (the one with
      most samples so far) then TAB and shift+TAB can be used to go to the
      prev/next hot line.
      
      Pressing 'H' at any point will center again the screen on the hottest
      line.
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c97cf422
    • Arnaldo Carvalho de Melo's avatar
      perf probe: Remove redundant checks · 8635bf6e
      Arnaldo Carvalho de Melo authored
      While fixing an error propagating problem in f809b25 I added two
      redundant checks.
      
      I did that because I didn't expect the checks to be on the while and for
      loop condition expression, where they are tested before we run the loop,
      where the 'ret' variable is set.
      
      So remove it from there and leave it just after it is actually set,
      eliminating unneded tests.
      Reported-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8635bf6e
    • Arnaldo Carvalho de Melo's avatar
      perf evsel: Fix inverted test for fixing up attr.inherit flag · e603dc15
      Arnaldo Carvalho de Melo authored
      The kernel refuses mmapping an event with the inherit flag set for
      something that is systemwide (cpu == -1), and the evsel layer got this
      reversed at some point, fix it.
      
      The symtom was that the --pid and --tid parameters for 'perf record' and
      'perf top' returned with -EINVAL, like:
      
       # /tmp/build-perf/perf record -v -fo/tmp/perf.data -p 1042
         Warning:  ... trying to fall back to cpu-clock-ticks
      
         Fatal: failed to mmap with 22 (Invalid argument)
      Reported-by: default avatarDavid Ahern <dsahern@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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e603dc15
    • Arnaldo Carvalho de Melo's avatar
      perf probe: Fix error propagation leading to segfault · fbee632d
      Arnaldo Carvalho de Melo authored
      There are two hunks in this patch that stops probe processing as soon as one
      error is found, breaking out of loops, the other fix an error propagation that
      should return a negative error number but instead was returning the result of
      "ret < 0", which is 1 and thus made several error checks fail because they test
      agains < 0.
      
      The problem could be triggered by asking for a variable that was optimized out,
      fact that should stop the whole probe processing but instead was segfaulting
      while installing broken probes:
      
      [root@emilia ~]# probe perf_mmap:55 user_lock_limit
      Failed to find the location of user_lock_limit at this address.
       Perhaps, it has been optimized out.
      Failed to find 'user_lock_limit' in this function.
      Add new events:
        probe:perf_mmap      (on perf_mmap:55 with user_lock_limit)
        probe:perf_mmap_1    (on perf_mmap:55 with user_lock_limit)
      Segmentation fault (core dumped)
      [root@emilia ~]# perf probe -l
        probe:perf_mmap      (on perf_mmap:55@git/linux/kernel/perf_event.c with user_lock_limit)
        probe:perf_mmap_1    (on perf_mmap:55@git/linux/kernel/perf_event.c with user_lock_limit)
      [root@emilia ~]#
      
      After the fix:
      
      [root@emilia ~]# probe perf_mmap:55 user_lock_limit
      Failed to find the location of user_lock_limit at this address.
       Perhaps, it has been optimized out.
      Failed to find 'user_lock_limit' in this function.
        Error: Failed to add events. (-2)
      [root@emilia ~]#
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fbee632d
  5. 18 Feb, 2011 7 commits
    • Michael Witten's avatar
      perf tools: Makefile: Remove various and sundry cruft · a3d1ee10
      Michael Witten authored
      This commit squashes several commits that remove:
      
       unnecessary uname calls
       `sh -c'
       BUILT_INS and QUIET_BUILT_IN
      
          They have no effect, and the `fixup-builtins' and `check-builtins.sh'
          scripts don't even exist.
      
       RUNTIME_PREFIX
      
          It's currently never anything but unset, and it's apparently
          only meaningful when Microsoft Windows is the operating system
          (according to the source for git).
      
       TEST_PROGRAMS
       EXTRA_PROGRAMS
       unused SHELL_PATH_SQ portions
       unused test for V=2
       useless exports
      
          Only when `V' is undefined (that is, only when the value of `V'
          is empty) is `export V' performed, which just has the effect of
          placing the empty-valued variable `V' in the environment.
      
          The only other script to make use of `V' is `Documentation/Makefile',
          which only checks whether `V' is undefined (that is, whether the value
          of `V' is empty); hence, the `export V' has no effect whatsoever.
      
          Similarly, `export QUIET_GEN' is useless because it will only have
          a non-empty value when `V' has an empty-value, and when `V' has
          an empty-value, `QUIET_GEN' is always explicitly set in every
          script in which it is used.
      
          `DESTDIR' is only ever defined by the user via the environment
          or the command line, both of which are automatically exported
          to sub-make processes. Furthermore, no non-make sub-scripts
          make use of `DESTDIR' as an environment variable.
      
          No other scripts use `perfexec_instdir'.
      
       unused QUIET_SUBDIR{0,1}
       TAR and RPMBUILD
       PTHREAD_LIBS
       Maintainer's dist rules and commands
       distclean target
       Test suite coverage testing
       PRINT_DIR and NO_SUBDIR
       `configure' target
       NO_CURL
       @@PERF_VERSION@@ substitution
      
          Without the sed command, all of the rule's commands can be reduced
          to a single line that copies a file and sets the permissions properly
          in the process.
      
       `make test' echo line
       template_instdir
       PERF-BUILD-OPTIONS
       double-colon rules
      
          The use of double-colon rules seems misguided or vestigial git.
      
       Essentially hard-coded $(SCRIPTS) expansion
      Signed-off-by: default avatarMichael Witten <mfwitten@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a3d1ee10
    • Michael Witten's avatar
      perf tools: Makefile: Remove tool-specific cruft · 0a54fb63
      Michael Witten authored
      This commit squashes several commits that remove:
      
       NO_C99_FORMAT
       CURLDIR and EXPATDIR
       NO_DEFLATE_BOUND
       CC_LD_DYNPATH and NO_R_TO_GCC_LINKER
       NO_PERL_MAKEMAKER
       INTERNAL_QSORT
       NO_EXTERNAL_GREP
       NO_PERL
       SCRIPT_PERL
       PERL_PATH_SQ
      Signed-off-by: default avatarMichael Witten <mfwitten@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0a54fb63
    • Michael Witten's avatar
      perf tools: Makefile: Remove platform-specific cruft · 8796cb9d
      Michael Witten authored
      While it makes sense that this tool could be used on
      other platforms at least to parse data, there doesn't
      appear to be any real support for such usage.
      
      This commit squashes several commits that remove:
      
       SNPRINTF_RETURNS_BOGUS
       FREAD_READS_DIRECTORIES
       NO_D_{INO,TYPE}_IN_DIRENT
       NO_STRCASESTR
       NO_MEMMEM
       NO_STRTOUMAX and NO_STRTOULL
       NO_SETENV
       NO_UNSETENV
       NO_MKDTEMP
       NEEDS_LIBICONV
       NEEDS_SOCKET
       NO_MMAP
       NO_PTHREADS
       NO_PREAD
       NO_TRUSTABLE_FILEMODE
       NO_IPV6 and NO_SOCKADDR_STORAGE
       NO_ICONV and OLD_ICONV
       NO_NSEC, USE_NSEC, and USE_ST_TIMESPEC
       NO_ST_BLOCKS_IN_STRUCT_STAT
       NO_FINK and NO_DARWIN_PORTS
       NO_SYS_SELECT_H
       NO_HSTRERROR
       DIR_HAS_BSD_GROUP_SEMANTICS and FORCE_DIR_SET_GID
       NEEDS_NSL, NO_UINTMAX_T, NO_INET_{N,P}TON
       COMPAT_{CFLAGS,OBJS}
       Executable extension `X'
      Signed-off-by: default avatarMichael Witten <mfwitten@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8796cb9d
    • Michael Witten's avatar
      perf tools: Makefile: Remove vestigial git-specific cruft · 006cdc32
      Michael Witten authored
      This commit squashes several commits that remove:
      
       NO_SYMLINK_HEAD
       NO_SVN_TESTS
       NO_FAST_WORKING_DIRECTORY
       USE_STDEV
       SHA1/SSL cruft
       makefile rules
      Signed-off-by: default avatarMichael Witten <mfwitten@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      006cdc32
    • Jan Beulich's avatar
      x86: Remove die_nmi() · 02ca752e
      Jan Beulich authored
      With no caller left, the function and the DIE_NMIWATCHDOG
      enumerator can both go away.
      Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Don Zickus <dzickus@redhat.com>
      LKML-Reference: <4D5D521C0200007800032702@vpn.id2.novell.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      02ca752e
    • Ingo Molnar's avatar
      Merge branch 'perf/core' of... · e4cc9f4a
      Ingo Molnar authored
      Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
      e4cc9f4a
    • Ingo Molnar's avatar
      Revert "tracing: Add unstable sched clock note to the warning" · e9345aab
      Ingo Molnar authored
      This reverts commit 5e38ca8f.
      
      Breaks the build of several !CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
      architectures.
      
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Message-ID: <20110217171823.GB17058@elte.hu>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e9345aab
  6. 17 Feb, 2011 8 commits
    • Arnaldo Carvalho de Melo's avatar
      perf list: Allow filtering list of events · 668b8788
      Arnaldo Carvalho de Melo authored
      The man page has the details, here are some examples:
      
      [root@emilia ~]# perf list *fault*  *:*wait*
      
      List of pre-defined events (to be used in -e):
        page-faults OR faults                      [Software event]
        minor-faults                               [Software event]
        major-faults                               [Software event]
        alignment-faults                           [Software event]
        emulation-faults                           [Software event]
      
        radeon:radeon_fence_wait_begin             [Tracepoint event]
        radeon:radeon_fence_wait_end               [Tracepoint event]
        writeback:wbc_writeback_wait               [Tracepoint event]
        writeback:wbc_balance_dirty_wait           [Tracepoint event]
        writeback:writeback_congestion_wait        [Tracepoint event]
        writeback:writeback_wait_iff_congested     [Tracepoint event]
        sched:sched_wait_task                      [Tracepoint event]
        sched:sched_process_wait                   [Tracepoint event]
        sched:sched_stat_wait                      [Tracepoint event]
        sched:sched_stat_iowait                    [Tracepoint event]
        syscalls:sys_enter_epoll_wait              [Tracepoint event]
        syscalls:sys_exit_epoll_wait               [Tracepoint event]
        syscalls:sys_enter_epoll_pwait             [Tracepoint event]
        syscalls:sys_exit_epoll_pwait              [Tracepoint event]
        syscalls:sys_enter_rt_sigtimedwait         [Tracepoint event]
        syscalls:sys_exit_rt_sigtimedwait          [Tracepoint event]
        syscalls:sys_enter_waitid                  [Tracepoint event]
        syscalls:sys_exit_waitid                   [Tracepoint event]
        syscalls:sys_enter_wait4                   [Tracepoint event]
        syscalls:sys_exit_wait4                    [Tracepoint event]
        syscalls:sys_enter_waitpid                 [Tracepoint event]
        syscalls:sys_exit_waitpid                  [Tracepoint event]
      [root@emilia ~]#
      Suggested-by: default avatarIngo 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      668b8788
    • Arnaldo Carvalho de Melo's avatar
      perf report: Tell the user when a perf.data file has no samples · 74cfc17d
      Arnaldo Carvalho de Melo authored
      [root@emilia ~]# perf report --stdio
      The perf.data file has no samples!
      [root@emilia ~]#
      
      The TUI shows a popup warning message with the same message.
      Reported-by: default avatarIngo 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: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      74cfc17d
    • Arnaldo Carvalho de Melo's avatar
      perf record: Delay setting the header writing atexit call · 712a4b60
      Arnaldo Carvalho de Melo authored
      While testing the --filter option I noticed that we were writing lots of
      unneeded stuff to the perf.data header when the filter ioctl fails, so
      move the atexit(atexit_header) call to after we create the counters
      successfully.
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      712a4b60
    • Arnaldo Carvalho de Melo's avatar
      perf hists: Print number of samples, not the period sum · fec9cbd1
      Arnaldo Carvalho de Melo authored
      So that we match the header where we state the number of events with the
      "Samples" column when using 'perf report -n/--show-nr-samples':
      
       [root@emilia ~]# perf record -a sleep 1
       [ perf record: Woken up 1 times to write data ]
       [ perf record: Captured and wrote 0.111 MB perf.data (~4860 samples) ]
       [root@emilia ~]# perf report --stdio --show-nr-samples
       # Events: 11  cycles
       #
       # Overhead  Samples        Command       Shared Object                        Symbol
       # ........ ..........  ...........  ..................  ............................
       #
           16.65%          1        sleep  [kernel.kallsyms]   [k] unmap_vmas
           16.10%          1         perf  libpthread-2.12.so  [.] __pthread_cleanup_push_defer
           15.79%          2         perf  [kernel.kallsyms]   [k] format_decode
           12.88%          1  kworker/1:2  [kernel.kallsyms]   [k] cache_reap
           10.69%          1      swapper  [kernel.kallsyms]   [k] _raw_spin_lock
            7.55%          1        sleep  [kernel.kallsyms]   [k] prepare_exec_creds
            6.00%          1         perf  [jbd2]              [k] start_this_handle
            5.29%          1         perf  [kernel.kallsyms]   [k] seq_read
            4.75%          1         perf  [kernel.kallsyms]   [k] get_pid_task
            4.30%          1         perf  [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore
      
       #
       # (For a higher level overview, try: perf report --sort comm,dso)
       #
       [root@emilia ~]#
      Reported-by: default avatarStephane Eranian <eranian@google.com>
      Acked-by: default avatarStephane Eranian <eranian@google.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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      fec9cbd1
    • Ingo Molnar's avatar
      Merge branch 'perf/core' of... · bee96907
      Ingo Molnar authored
      Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
      bee96907
    • Ingo Molnar's avatar
      Merge branch 'tip/perf/core' of... · 5beda5f6
      Ingo Molnar authored
      Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
      5beda5f6
    • Stephane Eranian's avatar
      perf: make perf stat print user provided full event names · f0c55bcf
      Stephane Eranian authored
      This patch changes the way perf stat prints event names at the end of a
      run. Until now, it was trying to reconstruct the event name from its
      encoding. The problem is that it would only print generic events without
      their modifiers (u, k, pp).
      
      This patch saves the event name as passed by the user in the evsel
      struct and uses it to print the final event name.
      
      This would also work in case perf is linked with a library (such as
      libpfm4) which provides full PMU event tables.
      
      $ perf stat -e cycles:u,cycles:k date
      Wed Feb 16 14:58:52 CET 2011
      
       Performance counter stats for 'date':
      
                  568600 cycles:u
                 2779715 cycles:k
      
              0.001908182  seconds time elapsed
      
      Cc: Arun Sharma <arun@sharma-home.net>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@gmail.com>
      LPU-Reference: <4d5bdc64.98a1df0a.7aa3.06c2@mx.google.com>
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      [ committer note: Fixed a merge problem with 023695d9 "Add cgroup support" ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f0c55bcf
    • Arnaldo Carvalho de Melo's avatar
      perf python: Add cgroup.c to setup.py to get it building again · 4498062e
      Arnaldo Carvalho de Melo authored
      The 023695d9 cset added a new file, util/cgroup.c, that is referenced from
      util/evsel.c, so it needs to be present in util/setup.py so that the python
      shared object binding works, fixing this:
      
      [root@emilia linux]# export PYTHONPATH=~acme/git/build/perf/python/
      [root@emilia linux]# ./tools/perf/python/twatch.py
      Traceback (most recent call last):
        File "./tools/perf/python/twatch.py", line 16, in <module>
          import perf
      ImportError: /home/acme/git/build/perf/python/perf.so: undefined symbol: close_cgroup
      
      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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4498062e
  7. 16 Feb, 2011 11 commits