1. 13 1月, 2014 11 次提交
    • J
      perf tools: Move arch setup into seprate Makefile · a6cf5f39
      Jiri Olsa 提交于
      I need to use arch related setup in the tests/make, so moving arch setup
      into Makefile.arch.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1388759553-12974-1-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a6cf5f39
    • A
      perf stat: Remove misplaced __maybe_unused · 41cde476
      Arnaldo Carvalho de Melo 提交于
      That 'argc' argument _is_ being used.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-t2gsxc15zulkorieg8zq996o@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      41cde476
    • A
      perf tests: Fixup leak on error path in parse events test · 2d4352c0
      Arnaldo Carvalho de Melo 提交于
      We need to call the evlist destructor when failing to parse events.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-ilslu69s7v7bpvdgqtrlp8f5@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2d4352c0
    • A
      perf evlist: Auto unmap on destructor · 983874d1
      Arnaldo Carvalho de Melo 提交于
      Removing further boilerplate after making sure perf_evlist__munmap can
      be called multiple times for the same evlist.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-o0luenuld4abupm4nmrgzm6f@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      983874d1
    • A
      perf evlist: Close fds on destructor · f26e1c7c
      Arnaldo Carvalho de Melo 提交于
      Since it is safe to call perf_evlist__close() multiple times, autoclose
      it and remove the calls to the close from existing tools, reducing the
      tooling boilerplate.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-2kq9v7p1rude1tqxa0aue2tk@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f26e1c7c
    • A
      perf evlist: Move destruction of maps to evlist destructor · 03ad9747
      Arnaldo Carvalho de Melo 提交于
      Instead of requiring tools to do an extra destructor call just before
      calling perf_evlist__delete.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-0jd2ptzyikxb5wp7inzz2ah2@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      03ad9747
    • A
      perf record: Remove old evsel_list usage · 3e2be2da
      Arnaldo Carvalho de Melo 提交于
      To be consistent with other places, use just 'evlist' for the evsel list
      variable, and since we have it in 'struct record', use it directly from
      there.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-396bnfvmlxrsj3o2tk47b8t1@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3e2be2da
    • A
      perf evlist: Move the SIGUSR1 error reporting logic to prepare_workload · 735f7e0b
      Arnaldo Carvalho de Melo 提交于
      So that we have the boilerplate in the preparation method, instead of
      open coded in tools wanting the reporting when the exec fails.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-purbdzcphdveskh7wwmnm4t7@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      735f7e0b
    • A
      perf evlist: Send the errno in the signal when workload fails · f33cbe72
      Arnaldo Carvalho de Melo 提交于
      When a tool uses perf_evlist__start_workload and the supplied workload
      fails (e.g.: its binary wasn't found), perror was being used to print
      the error reason.
      
      This is undesirable, as the caller may be a GUI, when it wants to have
      total control of the error reporting process.
      
      So move to using sigaction(SA_SIGINFO) + siginfo_t->sa_value->sival_int
      to communicate to the caller the errno and let it print it using the UI
      of its choosing.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-epgcv7kjq8ll2udqfken92pz@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f33cbe72
    • A
      perf stat: Don't show counter information when workload fails · 6af206fd
      Arnaldo Carvalho de Melo 提交于
      When starting a workload 'stat' wasn't using prepare_workload evlist
      method's signal based exec() error reporting mechanism.
      
      Use it so that the we don't report 'not counted' counters.
      
      Before:
      
        [acme@zoo linux]$ perf stat dfadsfa
        dfadsfa: No such file or directory
      
         Performance counter stats for 'dfadsfa':
      
             <not counted>      task-clock
             <not counted>      context-switches
             <not counted>      cpu-migrations
             <not counted>      page-faults
             <not counted>      cycles
             <not counted>      stalled-cycles-frontend
           <not supported>      stalled-cycles-backend
             <not counted>      instructions
             <not counted>      branches
             <not counted>      branch-misses
      
               0.001831462 seconds time elapsed
      
        [acme@zoo linux]$
      
      After:
      
        [acme@zoo linux]$ perf stat dfadsfa
        dfadsfa: No such file or directory
        [acme@zoo linux]$
      Reported-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      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@kernel.org>
      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-5yui3bv7e3hitxucnjsn6z8q@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6af206fd
    • I
      Merge tag 'perf-core-for-mingo' of... · 1341f3e4
      Ingo Molnar 提交于
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf updates from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
      Improvements:
      
       * Support showing source code, asking for variables to be collected
         at probe time and other 'perf probe' operations that use DWARF information.
      
         This supports only binaries with debugging information at this time, detached
         debuginfo (aka debuginfo packages) support should come in later patches.
         (Masami Hiramatsu)
      
       * Add a perf.data file header window in the 'perf report' TUI, associated
         with the 'i' hotkey, providing a counterpart to the --header option in the
         stdio UI. (Namhyung Kim)
      
       * Guest related improvements to 'perf kvm', including allowing to
         specify a directory with guest specific /proc information. (Dongsheng Yang)
      
       * Print session information only if --stdio is given (Namhyung Kim)
      
      Developer stuff:
      
      Fixes:
      
       * Get rid of a duplicate va_end() in error reporting (Namhyung Kim)
      
       * If a hist entry doesn't have symbol information, compare it with its
         address. Affects upcoming new feature (--cumulate) (Namhyung Kim)
      
      Improvements:
      
       * Make libtraceevent install target quieter (Jiri Olsa)
      
       * Make tests/make output more compact (Jiri Olsa)
      
       * Ignore generated files in feature-checks (Chunwei Chen)
      
      New APIs:
      
       * Introduce pevent_filter_strerror() in libtraceevent, similar in
         purpose to libc's strerror() function. (Namhyung Kim)
      
      Refactorings:
      
       * Use perf_data_file methods to write output file in 'record' and
         'inject' (Jiri Olsa)
      
       * Use pr_*() functions where applicable in 'report' (Namhyumg Kim)
      
       * Add 'machine' 'addr_location' struct to have full picture (machine,
         thread, map, symbol, addr) for a (partially) resolved address, reducing
         function signatures (Arnaldo Carvalho de Melo)
      
       * Reduce code duplication in the histogram entry creation/insertion. (Arnaldo Carvalho de Melo)
      
       * Auto allocate annotation histogram data structures, (Arnaldo Carvalho de Melo)
      
       * No need to test against NULL before calling free, also set
         freed memory in struct pointers to NULL, to help fixing use after
         free bugs. (Arnaldo Carvalho de Melo>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      1341f3e4
  2. 12 1月, 2014 3 次提交
  3. 28 12月, 2013 2 次提交
  4. 27 12月, 2013 1 次提交
  5. 26 12月, 2013 5 次提交
    • N
      perf ui/tui: Implement header window · 6dd60135
      Namhyung Kim 提交于
      Implement a simple, full-screen header window which shows session header
      (metadata) information.  Press 'i' key to display the header window.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1388036284-32342-4-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6dd60135
    • N
      perf ui/tui: Split help message for perf top and report · e8e684a5
      Namhyung Kim 提交于
      Some hotkeys don't work for perf top so split help messages for them.
      
      It'll be helpful to a future modification.  Also sort the message by
      alphabetical order of the hotkey.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1388036284-32342-3-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e8e684a5
    • N
      perf ui/tui: Protect windows by ui__lock · 5c743cf5
      Namhyung Kim 提交于
      Sometimes perf top TUI breaks display with concurrent help/input window
      and pr_* messages since they're not protected by ui__lock.
      
      You can check it by pressing (and not releasing) 'h' key on a "perf top
      -vvv" TUI session.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1388036284-32342-2-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5c743cf5
    • M
      perf probe: Support basic dwarf-based operations on uprobe events · fb7345bb
      Masami Hiramatsu 提交于
      Support basic dwarf(debuginfo) based operations for uprobe events.  With
      this change, perf probe can analyze debuginfo of user application binary
      to set up new uprobe event.
      
      This allows perf-probe --add(with local variables, line numbers) and
      --line works with -x option.  (Actually, --vars has already accepted -x
      option)
      
      For example, the following command shows the probe-able lines of a given
      user space function. Something that so far was only available in the
      'perf probe' tool for kernel space functions:
      
        # ./perf probe -x perf --line map__load
        <map__load@/home/fedora/ksrc/linux-2.6/tools/perf/util/map.c:0>
              0  int map__load(struct map *map, symbol_filter_t filter)
              1  {
              2         const char *name = map->dso->long_name;
                        int nr;
      
              5         if (dso__loaded(map->dso, map->type))
              6                 return 0;
      
              8         nr = dso__load(map->dso, map, filter);
              9         if (nr < 0) {
             10                 if (map->dso->has_build_id) {
      
      And this shows the available variables at the given line of the
      function.
      
        # ./perf probe -x perf --vars map__load:8
        Available variables at map__load:8
                @<map__load+96>
                        char*   name
                        struct map*     map
                        symbol_filter_t filter
                @<map__find_symbol+112>
                        char*   name
                        symbol_filter_t filter
                @<map__find_symbol_by_name+136>
                        char*   name
                        symbol_filter_t filter
                @<map_groups__find_symbol_by_name+176>
                        char*   name
                        struct map*     map
                        symbol_filter_t filter
      
      And lastly, we can now define probe(s) with all available
      variables on the given line:
      
        # ./perf probe -x perf --add 'map__load:8 $vars'
      
        Added new events:
          probe_perf:map__load (on map__load:8 with $vars)
          probe_perf:map__load_1 (on map__load:8 with $vars)
          probe_perf:map__load_2 (on map__load:8 with $vars)
          probe_perf:map__load_3 (on map__load:8 with $vars)
      
        You can now use it in all perf tools, such as:
      
                perf record -e probe_perf:map__load_3 -aR sleep 1
      
        Changes from previous version:
         - Add examples in the patch description.
         - Use .text section start address and dwarf symbol address
           for calculating the offset of given symbol, instead of
           searching the symbol in symtab again.
           With this change, we can safely handle multiple local
           function instances (e.g. scnprintf in perf).
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: David A. Long <dave.long@linaro.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: systemtap@sourceware.org
      Cc: yrl.pp-manager.tt@hitachi.com
      Link: http://lkml.kernel.org/r/20131226054152.22364.47021.stgit@kbuild-fedora.novalocalSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fb7345bb
    • M
      perf probe: Expand given path to absolute path · 8a613d40
      Masami Hiramatsu 提交于
      Expand given path to absolute path in the option parser, except for a
      module name.
      
      Since realpath at later stage in processing several probe point, can be
      called several times (even if currently doesn't, it can happen when we
      expands the feature), it is waste of the performance.
      
      Processing it once at the early stage can avoid that.
      
      Changes from previous one:
       - Fix not to print null string.
       - Allocate memory for given path/module name everytime.
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: "David A. Long" <dave.long@linaro.org>
      Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: systemtap@sourceware.org
      Cc: yrl.pp-manager.tt@hitachi.com
      Link: http://lkml.kernel.org/r/20131226054150.22364.12187.stgit@kbuild-fedora.novalocal
      [ Clarified the pr_warning message as per David Ahern's suggestion ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8a613d40
  6. 24 12月, 2013 7 次提交
  7. 21 12月, 2013 2 次提交
  8. 20 12月, 2013 9 次提交