1. 11 8月, 2015 1 次提交
  2. 05 8月, 2015 1 次提交
  3. 30 7月, 2015 1 次提交
    • J
      perf tools: Force period term to overload global settings · ee4c7588
      Jiri Olsa 提交于
      Currently the command line option settings beats the per event period
      settings:
      
      With no global settings, we get per-event configuration:
      
        $ perf record -e 'cpu/instructions,period=20000/' sleep 1
        $ perf evlist -v
        ... { sample_period, sample_freq }: 20000 ...
      
      With 'c' option period setup, we get 'c' option value:
        $ perf record -e 'cpu/instructions,period=20000/' -c 1000 sleep 1
        $ perf evlist -v
        ... { sample_period, sample_freq }: 1000 ...
      
      This patch makes the per-event settings overload the global 'c' option
      setup:
      
        $ perf record -e 'cpu/instructions,period=20000/' -c 1000 sleep 1
        $ perf evlist -v
        ... { sample_period, sample_freq }: 20000 ...
      
      I think the making the per-event settings to overload any other config
      makes more sense than current state. However it breaks the current
      'period' term handling, which might cause some noise.. so let's see ;-).
      
      Also fixing parse event tests with the new behaviour.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/1438162936-59698-3-git-send-email-kan.liang@intel.comSigned-off-by: NKan Liang <kan.liang@intel.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ee4c7588
  4. 24 7月, 2015 1 次提交
  5. 21 7月, 2015 1 次提交
    • W
      perf record: Allow filtering perf's pid via --exclude-perf · 4ba1faa1
      Wang Nan 提交于
      This patch allows 'perf record' to exclude events issued by perf itself
      by '--exclude-perf' option.
      
      Before this patch, when doing something like:
      
       # perf record -a -e syscalls:sys_enter_write <cmd>
      
      One could easily get result like this:
      
       # /tmp/perf report --stdio
       ...
        # Overhead  Command  Shared Object       Symbol
        # ........  .......  ..................  ....................
        #
            99.99%  perf     libpthread-2.18.so  [.] __write_nocancel
            0.01%   ls       libc-2.18.so        [.] write
            0.01%   sshd     libc-2.18.so        [.] write
       ...
      
      Where most events are generated by perf itself.
      
      A shell trick can be done to filter perf itself out:
      
       # cat << EOF > ./tmp
       > #!/bin/sh
       > exec perf record -e ... --filter="common_pid != \$\$" -a sleep 10
       > EOF
       # chmod a+x ./tmp
       # ./tmp
      
      However, doing so is user unfriendly.
      
      This patch extracts evsel iteration framework introduced by patch 'perf
      record: Apply filter to all events in a glob matching' into
      foreach_evsel_in_last_glob(), and makes exclude_perf() function append
      new filter expression to each evsel selected by a '-e' selector.
      
      To avoid losing filters if user pass '--filter' after '--exclude-perf',
      this patch uses perf_evsel__append_filter() in both case, instead of
      perf_evsel__set_filter() which removes old filter. As a side effect, now
      it is possible to use multiple '--filter' option for one selector. They
      are combinded with '&&'.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1436513770-8896-2-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4ba1faa1
  6. 14 7月, 2015 1 次提交
  7. 20 6月, 2015 1 次提交
  8. 10 6月, 2015 1 次提交
  9. 12 5月, 2015 1 次提交
  10. 06 5月, 2015 1 次提交
  11. 29 4月, 2015 1 次提交
  12. 08 4月, 2015 1 次提交
  13. 02 3月, 2015 2 次提交
  14. 25 2月, 2015 1 次提交
  15. 19 2月, 2015 1 次提交
    • K
      perf tools: Enable LBR call stack support · aad2b21c
      Kan Liang 提交于
      Currently, there are two call chain recording options, fp and dwarf.
      
      Haswell has a new feature that utilizes the existing LBR facility to
      record call chains. Kernel side LBR support code provides this as a
      third option to record call chains. This patch enables the lbr call
      stack support on the tooling side.
      
      LBR call stack has some limitations:
      
       - It reuses current LBR facility, so LBR call stack and branch record
         can not be enabled at the same time.
      
       - It is only available for user-space callchains.
      
      However, it also offers some advantages:
      
       - LBR call stack can work on user apps which don't have frame-pointers
         or dwarf debug info compiled. It is a good alternative when nothing
         else works.
      Tested-by: NJiri Olsa <jolsa@kernel.org>
      Signed-off-by: NKan Liang <kan.liang@intel.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Cody P Schafer <cody@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Jacob Shin <jacob.w.shin@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Masanari Iida <standby24x7@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Rodrigo Campos <rodrigo@sdfg.com.ar>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1420482185-29830-2-git-send-email-kan.liang@intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      aad2b21c
  16. 22 1月, 2015 1 次提交
  17. 03 12月, 2014 1 次提交
  18. 16 11月, 2014 1 次提交
  19. 16 10月, 2014 1 次提交
  20. 05 6月, 2014 1 次提交
  21. 15 1月, 2014 2 次提交
  22. 13 1月, 2014 1 次提交
  23. 28 11月, 2013 2 次提交
  24. 15 11月, 2013 1 次提交
  25. 29 10月, 2013 1 次提交
  26. 09 10月, 2013 1 次提交
  27. 04 10月, 2013 2 次提交
  28. 09 7月, 2013 2 次提交
  29. 01 4月, 2013 1 次提交
    • A
      perf tools: Add support for weight v7 (modified) · 05484298
      Andi Kleen 提交于
      perf record has a new option -W that enables weightened sampling.
      
      Add sorting support in top/report for the average weight per sample and the
      total weight sum. This allows to both compare relative cost per event
      and the total cost over the measurement period.
      
      Add the necessary glue to perf report, record and the library.
      
      v2: Merge with new hist refactoring.
      v3: Fix manpage. Remove value check.
      Rename global_weight to weight and weight to local_weight.
      v4: Readd sort keys to manpage
      v5: Move weight to end
      v6: Move weight to template
      v7: Rename weight key.
      
      Original patch from Andi modified by Stephane Eranian <eranian@google.com>
      to include ONLY the weight supporting code and apply to pristine 3.8.0-rc4.
      Signed-off-by: NAndi Kleen <ak@linux.intel.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/1359040242-8269-6-git-send-email-eranian@google.com
      [ committer note: changed to cope with fc5871ed and the hists_link perf test entry ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      05484298
  30. 03 12月, 2012 1 次提交
  31. 22 5月, 2012 1 次提交
  32. 09 3月, 2012 2 次提交
    • S
      perf record: Provide default branch stack sampling mode option · a5aabdac
      Stephane Eranian 提交于
      This patch chanegs the logic of the -b, --branch-stack options
      of perf record.
      
      Based on users' request, the patch provides a default filter
      mode with the -b (or --branch-any) option.  With the option,
      any type of taken branches is sampled.
      
      With -j (or --branch-filter), the user can specify any
      valid combination of branch types and privilege levels
      if supported by the underlying hardware.
      
      The -b (--branch any) is a shortcut for: --branch-filter any.
      
       $ perf record -b foo
      
      or:
      
       $ perf record --branch-filter any foo
      
      For more specific filtering:
      
       $ perf record --branch-filter ind_call,u foo
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Cc: peterz@infradead.org
      Cc: acme@redhat.com
      Cc: asharma@fb.com
      Cc: ravitillo@lbl.gov
      Cc: vweaver1@eecs.utk.edu
      Cc: khandual@linux.vnet.ibm.com
      Cc: dsahern@gmail.com
      Link: http://lkml.kernel.org/r/1331246868-19905-2-git-send-email-eranian@google.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
      a5aabdac
    • R
      perf record: Add support for sampling taken branch · bdfebd84
      Roberto Agostino Vitillo 提交于
      This patch adds a new option to enable taken branch stack
      sampling, i.e., leverage the PERF_SAMPLE_BRANCH_STACK feature
      of perf_events.
      
      There is a new option to active this mode: -b.
      It is possible to pass a set of filters to select the type of
      branches to sample.
      
      The following filters are available:
      
       - any : any type of branches
       - any_call : any function call or system call
       - any_ret : any function return or system call return
       - any_ind : any indirect branch
       - u:  only when the branch target is at the user level
       - k: only when the branch target is in the kernel
       - hv: only when the branch target is in the hypervisor
      
      Filters can be combined by passing a comma separated list
      to the option:
      
      $ perf record -b any_call,u -e cycles:u branchy
      Signed-off-by: NRoberto Agostino Vitillo <ravitillo@lbl.gov>
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Cc: peterz@infradead.org
      Cc: acme@redhat.com
      Cc: robert.richter@amd.com
      Cc: ming.m.lin@intel.com
      Cc: andi@firstfloor.org
      Cc: asharma@fb.com
      Cc: vweaver1@eecs.utk.edu
      Cc: khandual@linux.vnet.ibm.com
      Cc: dsahern@gmail.com
      Link: http://lkml.kernel.org/r/1328826068-11713-13-git-send-email-eranian@google.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
      bdfebd84
  33. 14 2月, 2012 1 次提交
  34. 25 1月, 2012 1 次提交