1. 12 5月, 2015 1 次提交
  2. 06 5月, 2015 1 次提交
  3. 29 4月, 2015 1 次提交
  4. 08 4月, 2015 1 次提交
  5. 02 3月, 2015 2 次提交
  6. 25 2月, 2015 1 次提交
  7. 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
  8. 22 1月, 2015 1 次提交
  9. 03 12月, 2014 1 次提交
  10. 16 11月, 2014 1 次提交
  11. 16 10月, 2014 1 次提交
  12. 05 6月, 2014 1 次提交
  13. 15 1月, 2014 2 次提交
  14. 13 1月, 2014 1 次提交
  15. 28 11月, 2013 2 次提交
  16. 15 11月, 2013 1 次提交
  17. 29 10月, 2013 1 次提交
  18. 09 10月, 2013 1 次提交
  19. 04 10月, 2013 2 次提交
  20. 09 7月, 2013 2 次提交
  21. 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
  22. 03 12月, 2012 1 次提交
  23. 22 5月, 2012 1 次提交
  24. 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
  25. 14 2月, 2012 1 次提交
  26. 25 1月, 2012 1 次提交
  27. 24 12月, 2011 1 次提交
  28. 16 2月, 2011 1 次提交
    • S
      perf tool: Add cgroup support · 023695d9
      Stephane Eranian 提交于
      This patch adds the ability to filter monitoring based on container groups
      (cgroups) for both perf stat and perf record. It is possible to monitor
      multiple cgroup in parallel. There is one cgroup per event. The cgroups to
      monitor are passed via a new -G option followed by a comma separated list of
      cgroup names.
      
      The cgroup filesystem has to be mounted. Given a cgroup name, the perf tool
      finds the corresponding directory in the cgroup filesystem and opens it. It
      then passes that file descriptor to the kernel.
      
      Example:
      
      $ perf stat -B -a -e cycles:u,cycles:u,cycles:u -G test1,,test2 -- sleep 1
       Performance counter stats for 'sleep 1':
      
            2,368,667,414  cycles                   test1
            2,369,661,459  cycles
            <not counted>  cycles                   test2
      
              1.001856890  seconds time elapsed
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <4d590290.825bdf0a.7d0a.4890@mx.google.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      023695d9
  29. 13 1月, 2011 1 次提交
    • K
      perf record: Add "nodelay" mode, disabled by default · acac03fa
      Kirill Smelkov 提交于
      Sometimes there is a need to use perf in "live-log" mode. The problem
      is, for seldom events, actual info output is largely delayed because
      perf-record reads sample data in whole pages.
      
      So for such scenarious, add flag for perf-record to go in "nodelay"
      mode. To track e.g. what's going on in icmp_rcv while ping is running
      Use it with something like this:
      
      (1) $ perf probe -L icmp_rcv | grep -U8 '^ *43\>'
                                          goto error;
                          }
               38         if (!pskb_pull(skb, sizeof(*icmph)))
                                  goto error;
                          icmph = icmp_hdr(skb);
      
               43         ICMPMSGIN_INC_STATS_BH(net, icmph->type);
                          /*
                           *      18 is the highest 'known' ICMP type. Anything else is a mystery
                           *
                           *      RFC 1122: 3.2.2  Unknown ICMP messages types MUST be silently
                           *                discarded.
                           */
               50         if (icmph->type > NR_ICMP_TYPES)
                                  goto error;
      
          $ perf probe icmp_rcv:43 'type=icmph->type'
      
      (2) $ cat trace-icmp.py
          [...]
          def trace_begin():
                  print "in trace_begin"
      
          def trace_end():
                  print "in trace_end"
      
          def probe__icmp_rcv(event_name, context, common_cpu,
                  common_secs, common_nsecs, common_pid, common_comm,
                  __probe_ip, type):
                          print_header(event_name, common_cpu, common_secs, common_nsecs,
                                  common_pid, common_comm)
      
                          print "__probe_ip=%u, type=%u\n" % \
                          (__probe_ip, type),
          [...]
      
      (3) $ perf record -a -D -e probe:icmp_rcv -o - | \
            perf script -i - -s trace-icmp.py
      
      Thanks to Peter Zijlstra for pointing how to do it.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>, 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: <20110112140613.GA11698@tugrik.mns.mnsspb.ru>
      Signed-off-by: NKirill Smelkov <kirr@mns.spb.ru>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      acac03fa
  30. 05 12月, 2010 1 次提交
    • A
      perf tools: Ask for ID PERF_SAMPLE_ info on all PERF_RECORD_ events · 9c90a61c
      Arnaldo Carvalho de Melo 提交于
      So that we can use -T == --timestamp, asking for PERF_SAMPLE_TIME:
      
        $ perf record -aT
        $ perf report -D | grep PERF_RECORD_
        <SNIP>
         3   5951915425 0x47530 [0x58]: PERF_RECORD_SAMPLE(IP, 1): 16811/16811: 0xffffffff8138c1a2 period: 215979 cpu:3
         3   5952026879 0x47588 [0x90]: PERF_RECORD_SAMPLE(IP, 1): 16811/16811: 0xffffffff810cb480 period: 215979 cpu:3
         3   5952059959 0x47618 [0x38]: PERF_RECORD_FORK(6853:6853):(16811:16811)
         3   5952138878 0x47650 [0x78]: PERF_RECORD_SAMPLE(IP, 1): 16811/16811: 0xffffffff811bac35 period: 431478 cpu:3
         3   5952375068 0x476c8 [0x30]: PERF_RECORD_COMM: find:6853
         3   5952395923 0x476f8 [0x50]: PERF_RECORD_MMAP 6853/6853: [0x400000(0x25000) @ 0]: /usr/bin/find
         3   5952413756 0x47748 [0xa0]: PERF_RECORD_SAMPLE(IP, 1): 6853/6853: 0xffffffff810d080f period: 859332 cpu:3
         3   5952419837 0x477e8 [0x58]: PERF_RECORD_MMAP 6853/6853: [0x3f44600000(0x21d000) @ 0]: /lib64/ld-2.5.so
         3   5952437929 0x47840 [0x48]: PERF_RECORD_MMAP 6853/6853: [0x7fff7e1c9000(0x1000) @ 0x7fff7e1c9000]: [vdso]
         3   5952570127 0x47888 [0x58]: PERF_RECORD_MMAP 6853/6853: [0x3f46200000(0x218000) @ 0]: /lib64/libselinux.so.1
         3   5952623637 0x478e0 [0x58]: PERF_RECORD_MMAP 6853/6853: [0x3f44a00000(0x356000) @ 0]: /lib64/libc-2.5.so
         3   5952675720 0x47938 [0x58]: PERF_RECORD_MMAP 6853/6853: [0x3f44e00000(0x204000) @ 0]: /lib64/libdl-2.5.so
         3   5952710080 0x47990 [0x58]: PERF_RECORD_MMAP 6853/6853: [0x3f45a00000(0x246000) @ 0]: /lib64/libsepol.so.1
         3   5952847802 0x479e8 [0x58]: PERF_RECORD_SAMPLE(IP, 1): 6853/6853: 0xffffffff813897f0 period: 1142536 cpu:3
        <SNIP>
      
      First column is the cpu and the second the timestamp.
      
      That way we can investigate problems in the event stream.
      
      If the new perf binary is run on an older kernel, it will disable this feature
      automatically.
      Tested-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIan Munsie <imunsie@au1.ibm.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Stephane Eranian <eranian@google.com>
      LKML-Reference: <1291318772-30880-5-git-send-email-acme@infradead.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9c90a61c
  31. 02 12月, 2010 1 次提交
  32. 27 10月, 2010 1 次提交
  33. 17 6月, 2010 1 次提交
    • S
      perf record: Add option to avoid updating buildid cache · a1ac1d3c
      Stephane Eranian 提交于
      There are situations where there is enough information in the perf.data
      to process the samples. Updating the buildid cache may add unecessary
      overhead in terms of disk space and time (copying large elf images).
      
      A persistent option to do this already exists via the perfconfig file,
      simply do:
      
      [buildid]
      dir = /dev/null
      
      This patch provides a way to suppress builid cache updates on a per-run
      basis.  It addds a new option, -N, to perf record. Buildids are still
      generated in the perf.data file.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <4c19ef89.93ecd80a.40dc.fffff8e9@mx.google.com>
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a1ac1d3c
  34. 05 6月, 2010 1 次提交
    • S
      perf tools: Add the ability to specify list of cpus to monitor · c45c6ea2
      Stephane Eranian 提交于
      This patch adds a -C option to stat, record, top to designate a list of CPUs to
      monitor. CPUs can be specified as a comma-separated list or ranges, no space
      allowed.
      
      Examples:
      $ perf record -a -C0-1,4-7 sleep 1
      $ perf top -C0-4
      $ perf stat -a -C1,2,3,4 sleep 1
      
      With perf record in per-thread mode with inherit mode on, samples are collected
      only when the thread runs on the designated CPUs.
      
      The -C option does not turn on system-wide mode automatically.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric 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: <4bff9496.d345d80a.41fe.7b00@mx.google.com>
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c45c6ea2