1. 19 12月, 2013 3 次提交
  2. 11 12月, 2013 1 次提交
    • J
      perf report: Add --header/--header-only options · 5cfe2c82
      Jiri Olsa 提交于
      Currently the perf.data header is always displayed for stdio output,
      which is no always useful.
      
      Disabling header information by default and adding following options to
      control header output:
      
        --header      - display header information (old default)
        --header-only - display header information only w/o further
                        processing, forces stdio output
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NDavid Ahern <dsahern@gmail.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>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1386583370-1699-2-git-send-email-jolsa@redhat.com
      [ Added single line explaining talking about the new --header* options,
        to address David Ahern comment; better man page entry for the new options,
        from Namhyung Kim ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5cfe2c82
  3. 05 11月, 2013 1 次提交
  4. 04 11月, 2013 2 次提交
  5. 24 10月, 2013 1 次提交
  6. 23 10月, 2013 1 次提交
  7. 22 10月, 2013 3 次提交
    • W
      perf report: Add --max-stack option to limit callchain stack scan · 91e95617
      Waiman Long 提交于
      When callgraph data was included in the perf data file, it may take a
      long time to scan all those data and merge them together especially if
      the stored callchains are long and the perf data file itself is large,
      like a Gbyte or so.
      
      The callchain stack is currently limited to PERF_MAX_STACK_DEPTH (127).
      This is a large value. Usually the callgraph data that developers are
      most interested in are the first few levels, the rests are usually not
      looked at.
      
      This patch adds a new --max-stack option to perf-report to limit the
      depth of callchain stack data to look at to reduce the time it takes for
      perf-report to finish its processing. It trades the presence of trailing
      stack information with faster speed.
      
      The following table shows the elapsed time of doing perf-report on a
      perf.data file of size 985,531,828 bytes.
      
        --max_stack   Elapsed Time    Output data size
        -----------   ------------    ----------------
        not set        88.0s          124,422,651
        64             87.5s          116,303,213
        32             87.2s          112,023,804
        16             86.6s           94,326,380
        8              59.9s           33,697,248
        4              40.7s           10,116,637
        -g none        27.1s            2,555,810
      Signed-off-by: NWaiman Long <Waiman.Long@hp.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Aswin Chandramouleeswaran <aswin@hp.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.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: Scott J Norton <scott.norton@hp.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1382107129-2010-4-git-send-email-Waiman.Long@hp.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      91e95617
    • J
      perf session: Separating data file properties from session · cc9784bd
      Jiri Olsa 提交于
      Removing 'fd, fd_pipe, filename, size' from struct perf_session and
      replacing them with struct perf_data_file object.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      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/1381847254-28809-4-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cc9784bd
    • J
      perf tools: Add data object to handle perf data file · f5fc1412
      Jiri Olsa 提交于
      This patch is adding 'struct perf_data_file' object as a placeholder for
      all attributes regarding perf.data file handling. Changing
      perf_session__new to take it as an argument.
      
      The rest of the functionality will be added later to keep this change
      simple enough, because all the places using perf_session are changed
      now.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      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/1381847254-28809-2-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f5fc1412
  8. 10 10月, 2013 1 次提交
  9. 04 10月, 2013 2 次提交
  10. 19 9月, 2013 1 次提交
  11. 11 9月, 2013 1 次提交
    • S
      perf tools: Add attr->mmap2 support · 5c5e854b
      Stephane Eranian 提交于
      This patch adds support for the new PERF_RECORD_MMAP2 record type
      exposed by the kernel. This is an extended PERF_RECORD_MMAP record.
      
      It adds for each file-backed mapping the device major, minor number and
      the inode number and generation.
      
      This triplet uniquely identifies the source of a file-backed mapping. It
      can be used to detect identical virtual mappings between processes, for
      instance.
      
      The patch will prefer MMAP2 over MMAP.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1377079825-19057-3-git-send-email-eranian@google.com
      [ Cope with 314add6b "Change machine__findnew_thread() to set thread pid",
        fix 'perf test' regression test entry affected,
        use perf_missing_features.mmap2 to fallback to not using .mmap2 in older kernels,
        so that new tools can work with kernels where this feature is not present ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5c5e854b
  12. 30 8月, 2013 1 次提交
  13. 12 8月, 2013 2 次提交
  14. 22 7月, 2013 1 次提交
  15. 16 7月, 2013 1 次提交
  16. 13 7月, 2013 4 次提交
    • J
      perf tools: Centralize default columns init in perf_hpp__init · 2b8bfa6b
      Jiri Olsa 提交于
      Now when diff command is separated from other standard outputs,
      we can use perf_hpp__init to initialize all standard columns.
      
      Moving PERF_HPP__OVERHEAD column init back to perf_hpp__init,
      and removing extra enable calls.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Reviewed-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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/n/tip-nj2xk89tj972tbqswfs498ex@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2b8bfa6b
    • G
      perf report/top: Add option to collapse undesired parts of call graph · b21484f1
      Greg Price 提交于
      For example, in an application with an expensive function implemented
      with deeply nested recursive calls, the default call-graph presentation
      is dominated by the different callchains within that function.  By
      ignoring these callees, we can collect the callchains leading into the
      function and compactly identify what to blame for expensive calls.
      
      For example, in this report the callers of garbage_collect() are
      scattered across the tree:
      
        $ perf report -d ruby 2>- | grep -m10 ^[^#]*[a-z]
            22.03%     ruby  [.] gc_mark
                       --- gc_mark
                          |--59.40%-- mark_keyvalue
                          |          st_foreach
                          |          gc_mark_children
                          |          |--99.75%-- rb_gc_mark
                          |          |          rb_vm_mark
                          |          |          gc_mark_children
                          |          |          gc_marks
                          |          |          |--99.00%-- garbage_collect
      
      If we ignore the callees of garbage_collect(), its callers are coalesced:
      
        $ perf report --ignore-callees garbage_collect -d ruby 2>- | grep -m10 ^[^#]*[a-z]
            72.92%     ruby  [.] garbage_collect
                       --- garbage_collect
                           vm_xmalloc
                          |--47.08%-- ruby_xmalloc
                          |          st_insert2
                          |          rb_hash_aset
                          |          |--98.45%-- features_index_add
                          |          |          rb_provide_feature
                          |          |          rb_require_safe
                          |          |          vm_call_method
      Signed-off-by: NGreg Price <price@mit.edu>
      Tested-by: NJiri Olsa <jolsa@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.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>
      Link: http://lkml.kernel.org/r/20130623031720.GW22203@biohazard-cafe.mit.edu
      Link: http://lkml.kernel.org/r/20130708115746.GO22203@biohazard-cafe.mit.edu
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      [ remove spaces at beginning of line, reported by Fengguang Wu ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b21484f1
    • J
      perf report: Fix perf_session__delete removal · d4ae0a6f
      Jiri Olsa 提交于
      There's no point of having out_delete label with perf_session__delete
      call within __cmd_report function, because it's called at the end of the
      cmd_report function.
      
      The speed up due to commenting out the perf_session__delete at the end
      does not seem relevant anymore. Measured speedup for ~1GB data file with
      222466 FORKS events is around 0.5%.
      
        $ perf report -i perf.data.delete -P perf_session__delete -s parent
      
        +  99.51%  [other]
        +   0.49%  perf_session__delete
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.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>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1372161253-22081-6-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d4ae0a6f
    • J
      perf tools: Do not elide parent symbol column · ad3d6f50
      Jiri Olsa 提交于
      I found the parent symbol column data interesting even
      if there's another sorting enabled. Switching it on.
      
      Previous behaviour:
        $ perf report -i perf.data.delete -p perf_session__delete -x
      
        +   3.60%  perf  perf               [.] __rb_change_child
        +   1.89%  perf  perf               [.] rb_erase
        +   1.89%  perf  perf               [.] rb_erase
        +   1.83%  perf  perf               [.] free@plt
      
      Current behaviour:
        $ perf report -i perf.data.delete -p perf_session__delete -x
      
        +   3.60%  perf  perf               [.] __rb_change_child        perf_session__delete
        +   1.89%  perf  perf               [.] rb_erase                 perf_session__delete_dead_threads
        +   1.89%  perf  perf               [.] rb_erase                 perf_session__delete_threads
        +   1.83%  perf  perf               [.] free@plt                 perf_session__delete
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.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/n/tip-r79fn89bhqz16ixa5zmyflrd@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ad3d6f50
  17. 09 7月, 2013 1 次提交
    • J
      perf tools: Fix -x/--exclude-other option for report command · 0276c22a
      Jiri Olsa 提交于
      Currently we have symbol_conf.exclude_other being set as true every time
      so the -x/--exclude-other has nothing to do.
      
      Also we have no way to see the data with symbol_conf.exclude_other being
      false which is useful sometimes.
      
      Fixing it by making symbol_conf.exclude_other false by default.
      
      1) Example without -x option:
      
        $ perf report -i perf.data.delete -p perf_session__delete -s parent
      
        +  99.91%  [other]
        +   0.08%  perf_session__delete
        +   0.00%  perf_session__delete_dead_threads
        +   0.00%  perf_session__delete_threads
      
      2) Example with -x option:
      
        $ ./perf report -i perf.data.delete -p perf_session__delete -s parent -x
      
        +  96.22%  perf_session__delete
        +   1.89%  perf_session__delete_dead_threads
        +   1.89%  perf_session__delete_threads
      
      In Example 1) we get the sorted out data together with the rest
      "[other]". This could help us estimate how much time we spent in the
      sorted data.
      
      In Example 2) the total is just the sorted data.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.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/n/tip-sg8fvu0fyqohf9ur9l38lhkw@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0276c22a
  18. 28 5月, 2013 8 次提交
  19. 01 4月, 2013 3 次提交
  20. 27 3月, 2013 1 次提交
  21. 16 3月, 2013 1 次提交