1. 23 2月, 2015 2 次提交
    • A
      perf trace: Add man page entry for --event · 77c92582
      Arnaldo Carvalho de Melo 提交于
      Forgot to do it when adding the feature.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-mx152b6x9cgknhw91vsyjlnd@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      77c92582
    • A
      perf trace: Introduce --filter-pids · f078c385
      Arnaldo Carvalho de Melo 提交于
      When tracing in X we get event loops due to the tracing activity, i.e.
      updates to a gnome-terminal that generate syscalls for X.org, etc.
      
      To get a more useful view of what is happening, syscall wise, system
      wide, we need to filter those, like in:
      
       # ps ax|egrep '981|2296|1519' | grep -v egrep
         981 tty1 Ss+ 5:40 /usr/bin/Xorg :0 -background none ...
        1519 ?    Sl  2:22 /usr/bin/gnome-shell
        2296 ?    Sl  4:16 /usr/libexec/gnome-terminal-server
       #
      
       # trace -e write --filter-pids 981,2296,1519
          0.385 ( 0.021 ms): goa-daemon/2061 write(fd: 1</dev/null>, buf: 0x7fbeb017b000, count: 136) = 136
          0.922 ( 0.014 ms): goa-daemon/2061 write(fd: 1</dev/null>, buf: 0x7fbeb017b000, count: 140) = 140
       5006.525 ( 0.029 ms): goa-daemon/2061 write(fd: 1</dev/null>, buf: 0x7fbeb017b000, count: 136) = 136
       5007.235 ( 0.023 ms): goa-daemon/2061 write(fd: 1</dev/null>, buf: 0x7fbeb017b000, count: 140) = 140
       5177.646 ( 0.018 ms): rtkit-daemon/782 write(fd: 5<anon_inode:[eventfd]>, buf: 0x7f7eea70be88, count: 8) = 8
       8314.497 ( 0.004 ms): gsd-locate-poi/2084 write(fd: 5<anon_inode:[eventfd]>, buf: 0x7fffe96af7b0, count: 8) = 8
       8314.518 ( 0.002 ms): gsd-locate-poi/2084 write(fd: 5<anon_inode:[eventfd]>, buf: 0x7fffe96af0e0, count: 8) = 8
       ^C#
      
      When this option is used the tracer pid is also filtered.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.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: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-f5qmiyy7c0uxdm21ncatpeek@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f078c385
  2. 16 10月, 2014 1 次提交
  3. 27 6月, 2014 2 次提交
    • S
      perf trace: Add possibility to switch off syscall events · e281a960
      Stanislav Fomichev 提交于
      Currently, we may either trace syscalls or syscalls+pagefaults.
      
      We'd like to be able to trace *only* pagefaults and this commit
      implements this feature.
      
      Example:
      
        [root@zoo /]# echo 1 > /proc/sys/vm/drop_caches ; trace --no-syscalls -F -p `pidof xchat`
             0.000 ( 0.000 ms): xchat/4574 majfault [g_unichar_get_script+0x11] => /usr/lib64/libglib-2.0.so.0.3800.2@0xc403b (x.)
             0.202 ( 0.000 ms): xchat/4574 majfault [_cairo_hash_table_lookup+0x53] => 0x2280ff0 (?.)
            20.854 ( 0.000 ms): xchat/4574 majfault [gdk_cairo_set_source_pixbuf+0x110] => /usr/bin/xchat@0x6da1f (x.)
          1022.000 ( 0.000 ms): xchat/4574 majfault [__memcpy_sse2_unaligned+0x29] => 0x7ff5a8ca0400 (?.)
        ^C[root@zoo /]#
      
      Below we can see malloc calls, 'trace' reading symbol tables in libraries to
      resolve symbols, etc.
      
        [root@zoo /]# echo 1 > /proc/sys/vm/drop_caches ; trace --no-syscalls -F all --cpu 1 sleep 10
             0.000 ( 0.000 ms): chrome/26589 minfault [0x1b53129] => /tmp/perf-26589.map@0x33cbcbf7f000 (x.)
            96.477 ( 0.000 ms): libvirtd/947 minfault [copy_user_enhanced_fast_string+0x5] => 0x7f7685bba000 (?k)
           113.164 ( 0.000 ms): Xorg/1063 minfault [0x786da] => 0x7fce52882a3c (?.)
          7162.801 ( 0.000 ms): chrome/3747 minfault [0x8e1a89] => 0xfcaefed0008 (?.)
      <SNIP>
          7773.138 ( 0.000 ms): chrome/3886 minfault [0x8e1a89] => 0xfcb0ce28008 (?.)
          7992.022 ( 0.000 ms): chrome/26574 minfault [0x1b5a708] => 0x3de7b5fc5000 (?.)
          8108.949 ( 0.000 ms): qemu-system-x8/4537 majfault [_int_malloc+0xee] => 0x7faffc466d60 (?.)
          8108.975 ( 0.000 ms): qemu-system-x8/4537 minfault [_int_malloc+0x102] => 0x7faffc466d60 (?.)
      <SNIP>
          8148.174 ( 0.000 ms): qemu-system-x8/4537 minfault [_int_malloc+0x102] => 0x7faffc4eb500 (?.)
          8270.855 ( 0.000 ms): chrome/26245 minfault [do_bo_emit_reloc+0xdb] => 0x45d092bc004 (?.)
          8270.869 ( 0.000 ms): chrome/26245 minfault [do_bo_emit_reloc+0x108] => 0x45d09150000 (?.)
      no symbols found in /usr/lib64/libspice-server.so.1.9.0, maybe install a debug package?
          8273.831 ( 0.000 ms): trace/20198 majfault [__memcmp_sse4_1+0xbc6] => /usr/lib64/libspice-server.so.1.9.0@0xdf000 (d.)
      <SNIP>
          8275.121 ( 0.000 ms): trace/20198 minfault [dso__load+0x38] => 0x14fe756 (?.)
      no symbols found in /usr/lib64/libelf-0.158.so, maybe install a debug package?
          8275.142 ( 0.000 ms): trace/20198 minfault [__memcmp_sse4_1+0xbc6] => /usr/lib64/libelf-0.158.so@0x0 (d.)
      <SNIP>
        [root@zoo /]#
      Signed-off-by: NStanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      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/1403799268-1367-6-git-send-email-stfomichev@yandex-team.ruSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e281a960
    • S
      perf trace: Add support for pagefault tracing · 598d02c5
      Stanislav Fomichev 提交于
      This patch adds optional pagefault tracing support to 'perf trace'.
      
      Using -F/--pf option user can specify whether he wants minor, major or
      all pagefault events to be traced. This patch adds only live mode,
      record and replace will come in a separate patch.
      
      Example output:
      
        1756272.905 ( 0.000 ms): curl/5937 majfault [0x7fa7261978b6] => /usr/lib/x86_64-linux-gnu/libkrb5.so.26.0.0@0x85288 (d.)
        1862866.036 ( 0.000 ms): wget/8460 majfault [__clear_user+0x3f] => 0x659cb4 (?k)
      Signed-off-by: NStanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      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/1403799268-1367-3-git-send-email-stfomichev@yandex-team.ruSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      598d02c5
  4. 13 11月, 2013 1 次提交
  5. 16 10月, 2013 1 次提交
    • A
      perf trace: Use vfs_getname hook if available · c522739d
      Arnaldo Carvalho de Melo 提交于
      Initially it tries to find a probe:vfs_getname that should be setup
      with:
      
       perf probe 'vfs_getname=getname_flags:65 pathname=result->name:string'
      
      or with slight changes to cope with code flux in the getname_flags code.
      
      In the future, if a "vfs:getname" tracepoint becomes available, then it
      will be preferred.
      
      This is not strictly required and more expensive method of reading the
      /proc/pid/fd/ symlink will be used when the fd->path array entry is not
      populated by a previous vfs_getname + open syscall ret sequence.
      
      As with any other 'perf probe' probe the setup must be done just once
      and the probe will be left inactive, waiting for users, be it 'perf
      trace' of any other tool.
      
      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: 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>
      Link: http://lkml.kernel.org/n/tip-ujg8se8glq5izmu8cdkq15po@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c522739d
  6. 14 10月, 2013 1 次提交
    • D
      perf trace: Add summary option to dump syscall statistics · bf2575c1
      David Ahern 提交于
      When enabled dumps a summary of all syscalls by task with the usual
      statistics -- min, max, average and relative stddev. For example,
      
      make - 26341 :       3344   [ 17.4% ]      0.000 ms
      
                      read :   52    0.000     4.802     0.644   30.08
                     write :   20    0.004     0.036     0.010   21.72
                      open :   24    0.003     0.046     0.014   23.68
                     close :   64    0.002     0.055     0.008   22.53
                      stat : 2714    0.002     0.222     0.004    4.47
                     fstat :   18    0.001     0.041     0.006   46.26
                      mmap :   30    0.003     0.009     0.006    5.71
                  mprotect :    8    0.006     0.039     0.016   32.16
                    munmap :   12    0.007     0.077     0.020   38.25
                       brk :   48    0.002     0.014     0.004   10.18
              rt_sigaction :   18    0.002     0.002     0.002    2.11
            rt_sigprocmask :   60    0.002     0.128     0.010   32.88
                    access :    2    0.006     0.006     0.006    0.00
                      pipe :   12    0.004     0.048     0.013   35.98
                     vfork :   34    0.448     0.980     0.692    3.04
                    execve :   20    0.000     0.387     0.046   56.66
                     wait4 :   34    0.017  9923.287   593.221   68.45
                     fcntl :    8    0.001     0.041     0.013   48.79
                  getdents :   48    0.002     0.079     0.013   19.62
                    getcwd :    2    0.005     0.005     0.005    0.00
                     chdir :    2    0.070     0.070     0.070    0.00
                 getrlimit :    2    0.045     0.045     0.045    0.00
                arch_prctl :    2    0.002     0.002     0.002    0.00
                 setrlimit :    2    0.002     0.002     0.002    0.00
                    openat :   94    0.003     0.005     0.003    2.11
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1381289214-24885-3-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bf2575c1
  7. 11 10月, 2013 1 次提交
  8. 09 10月, 2013 3 次提交
    • J
      perf tools: Add possibility to specify mmap size · 27050f53
      Jiri Olsa 提交于
      Adding possibility to specify mmap size via -m/--mmap-pages
      by appending unit size character (B/K/M/G) to the
      number, like:
        $ perf record -m 8K ls
        $ perf record -m 2M ls
      
      The size is rounded up appropriately to follow perf
      mmap restrictions.
      
      If no unit is specified the number provides pages as
      of now, like:
        $ perf record -m 8 ls
      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/r/1378031796-17892-3-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      27050f53
    • A
      perf trace: Add option to show process COMM · 50c95cbd
      Arnaldo Carvalho de Melo 提交于
      Enabled by default, disable with --no-comm, e.g.:
      
       181.821 (0.001 ms): deja-dup-monit/10784 recvmsg(fd: 8, msg: 0x7fff4342baf0, flags: PEEK|TRUNC|CMSG_CLOEXEC ) = 20
       181.824 (0.001 ms): deja-dup-monit/10784 geteuid(                                                           ) = 1000
       181.825 (0.001 ms): deja-dup-monit/10784 getegid(                                                           ) = 1000
       181.834 (0.002 ms): deja-dup-monit/10784 recvmsg(fd: 8, msg: 0x7fff4342baf0, flags: CMSG_CLOEXEC            ) = 20
       181.836 (0.001 ms): deja-dup-monit/10784 geteuid(                                                           ) = 1000
       181.838 (0.001 ms): deja-dup-monit/10784 getegid(                                                           ) = 1000
       181.705 (0.003 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: PEEK|TRUNC|CMSG_CLOEXEC) = 1256
       181.710 (0.002 ms): evolution-addr/10924 geteuid(                                                           ) = 1000
       181.712 (0.001 ms): evolution-addr/10924 getegid(                                                           ) = 1000
       181.727 (0.003 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: CMSG_CLOEXEC           ) = 1256
       181.731 (0.001 ms): evolution-addr/10924 geteuid(                                                           ) = 1000
       181.734 (0.001 ms): evolution-addr/10924 getegid(                                                           ) = 1000
       181.908 (0.002 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: PEEK|TRUNC|CMSG_CLOEXEC) = 20
       181.913 (0.001 ms): evolution-addr/10924 geteuid(                                                           ) = 1000
       181.915 (0.001 ms): evolution-addr/10924 getegid(                                                           ) = 1000
       181.930 (0.003 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: CMSG_CLOEXEC           ) = 20
       181.934 (0.001 ms): evolution-addr/10924 geteuid(                                                           ) = 1000
       181.937 (0.001 ms): evolution-addr/10924 getegid(                                                           ) = 1000
       220.718 (0.010 ms): at-spi2-regist/10715 sendmsg(fd: 3, msg: 0x7fffdb8756c0, flags: NOSIGNAL                ) = 200
       220.741 (0.000 ms): dbus-daemon/10711  ... [continued]: epoll_wait()) = 1
       220.759 (0.004 ms): dbus-daemon/10711 recvmsg(fd: 11, msg: 0x7ffff94594d0, flags: CMSG_CLOEXEC              ) = 200
       220.780 (0.002 ms): dbus-daemon/10711 recvmsg(fd: 11, msg: 0x7ffff94594d0, flags: CMSG_CLOEXEC              ) = 200
       220.788 (0.001 ms): dbus-daemon/10711 recvmsg(fd: 11, msg: 0x7ffff94594d0, flags: CMSG_CLOEXEC              ) = -1 EAGAIN Resource temporarily unavailable
       220.760 (0.004 ms): at-spi2-regist/10715 sendmsg(fd: 3, msg: 0x7fffdb8756c0, flags: NOSIGNAL                ) = 200
       220.771 (0.023 ms): perf/26347 open(filename: 0xf2e780, mode: 15918976                               ) = 19
       220.850 (0.002 ms): perf/26347 close(fd: 19                                                          ) = 0
      
      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: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-6be5jvnkdzjptdrebfn5263n@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      50c95cbd
    • D
      perf trace: Add option to show full timestamp · 4bb09192
      David Ahern 提交于
      Current timestamp shown for output is time relative to firt sample. This
      patch adds an option to show the absolute perf_clock timestamp which is
      useful when comparing output across commands (e.g., perf-trace to
      perf-script).
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.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>
      Link: http://lkml.kernel.org/r/1378319865-55695-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4bb09192
  9. 30 8月, 2013 1 次提交
  10. 27 8月, 2013 4 次提交
  11. 14 8月, 2013 1 次提交
  12. 25 10月, 2012 2 次提交
    • A
      perf trace: Use sched:sched_stat_runtime to provide a thread summary · 1302d88e
      Arnaldo Carvalho de Melo 提交于
      [root@sandy ~]# perf trace --sched --duration 0.100 --pid `pidof firefox`
      <SNIP>
       17079.847 ( 0.009 ms): 17643 poll(ufds: 140037623086496, nfds: 11, timeout_msecs: 0) = 0 Timeout
       17079.892 ( 0.010 ms): 17643 read(fd: 4, buf: 140038178943092, count: 4096         ) = -1 EAGAIN Resource temporarily unavailable
       17079.921 ( 0.013 ms): 17643 poll(ufds: 140037623086496, nfds: 11, timeout_msecs: 0) = 0 Timeout
       17079.949 ( 0.009 ms): 17643 read(fd: 4, buf: 140038178943092, count: 4096         ) = -1 EAGAIN Resource temporarily unavailable
      ^C
       _____________________________________________________________________
       __)    Summary of events    (__
      
                    [ task - pid ]     [ events ] [ ratio ]  [ runtime ]
       _____________________________________________________________________
      
                   firefox - 17643 :      18013   [ 72.2% ]    359.110 ms
                   firefox - 17663 :         41   [  0.2% ]     21.439 ms
                   firefox - 17664 :       6840   [ 27.4% ]    133.642 ms
                   firefox - 17667 :         46   [  0.2% ]      0.682 ms
      [root@sandy ~]#
      
      This is equivalent to the 'perf trace summary' subcomand in the tmp.perf/trace2
      branch.
      
      Another example, setting a huge duration filter to get just a system
      wide summary:
      
      [root@sandy ~]# perf trace --duration 10000.0 --sched
      ^C
       _____________________________________________________________________
       __)    Summary of events    (__
      
                    [ task - pid ]     [ events ] [ ratio ]  [ runtime ]
       _____________________________________________________________________
      
                 scsi_eh_1 - 258   :         15   [  0.0% ]      0.133 ms
              kworker/0:1H - 322   :         13   [  0.0% ]      0.032 ms
               jbd2/dm-0-8 - 384   :          4   [  0.0% ]      0.115 ms
               flush-253:0 - 470   :          1   [  0.0% ]      0.027 ms
                   firefox - 950   :       4783   [  0.1% ]     24.863 ms
                   firefox - 992   :       1883   [  0.1% ]      6.808 ms
                   firefox - 995   :         35   [  0.0% ]      0.111 ms
               ksoftirqd/6 - 4362  :          2   [  0.0% ]      0.005 ms
               ksoftirqd/7 - 4365  :          1   [  0.0% ]      0.007 ms
                      Xorg - 4671  :        148   [  0.0% ]      0.912 ms
           gnome-settings- - 4846  :         14   [  0.0% ]      0.086 ms
           seahorse-daemon - 4847  :         14   [  0.0% ]      0.092 ms
               gnome-panel - 4875  :         46   [  0.0% ]      0.159 ms
           gnome-power-man - 4918  :         16   [  0.0% ]      0.065 ms
           gvfs-afc-volume - 4992  :         77   [  0.0% ]      0.136 ms
           gnome-screensav - 5114  :         24   [  0.0% ]      0.128 ms
                     xchat - 8082  :        466   [  0.0% ]      2.019 ms
                  synergyc - 8369  :        941   [  0.0% ]      3.291 ms
                  synergyc - 8371  :         85   [  0.0% ]      1.817 ms
               jbd2/dm-4-8 - 9352  :          4   [  0.0% ]      0.109 ms
                   rpcbind - 9786  :          3   [  0.0% ]      0.017 ms
              rtkit-daemon - 12802 :         10   [  0.0% ]      0.038 ms
              rtkit-daemon - 12803 :          8   [  0.0% ]      0.000 ms
             udisks-daemon - 13020 :         27   [  0.0% ]      0.240 ms
               kworker/7:0 - 14651 :        669   [  0.0% ]      2.616 ms
               kworker/5:1 - 16220 :          2   [  0.0% ]      0.069 ms
               kworker/4:0 - 19776 :         13   [  0.0% ]      0.176 ms
                   openvpn - 20131 :        133   [  0.0% ]      0.762 ms
           plugin-containe - 20508 :      60658   [  1.7% ]    131.153 ms
              npviewer.bin - 20520 :      72208   [  2.0% ]    138.945 ms
              npviewer.bin - 20542 :         35   [  0.0% ]      0.074 ms
              npviewer.bin - 20543 :         30   [  0.0% ]      0.074 ms
              npviewer.bin - 20547 :         35   [  0.0% ]      0.092 ms
              npviewer.bin - 20552 :         35   [  0.0% ]      0.093 ms
                      sshd - 20645 :         32   [  0.0% ]      0.071 ms
              npviewer.bin - 21053 :         35   [  0.0% ]      0.074 ms
              npviewer.bin - 21054 :         35   [  0.0% ]      0.097 ms
               kworker/0:2 - 21169 :        149   [  0.0% ]      1.143 ms
               kworker/3:0 - 22171 :        113   [  0.0% ]     96.892 ms
               flush-253:4 - 22410 :          1   [  0.0% ]      0.028 ms
               kworker/6:0 - 24581 :         25   [  0.0% ]      0.275 ms
               kworker/1:0 - 25572 :          4   [  0.0% ]      0.103 ms
               kworker/2:1 - 26299 :        138   [  0.0% ]      1.440 ms
               kworker/0:0 - 26325 :          1   [  0.0% ]      0.003 ms
                      perf - 26330 :    3506967   [ 96.1% ]   6648.310 ms
      [root@sandy ~]#
      
      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@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/n/tip-mzuli0srnxyi1o029py6537x@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1302d88e
    • A
      perf trace: Add duration filter · ae9ed035
      Arnaldo Carvalho de Melo 提交于
      Example:
      
      [acme@sandy linux]$ perf trace --duration 0.025 usleep 1
           2.221 ( 0.958 ms): 6724 execve(arg0: 140733557168278, arg1: 140733557178768, arg2: 16134304, arg3: 140733557167840, arg4: 7955998171588342573, arg5: 6723) = -2
           3.690 ( 1.443 ms): 6724 execve(arg0: 140733557168295, arg1: 140733557178768, arg2: 16134304, arg3: 140733557167840, arg4: 7955998171588342573, arg5: 6723) = 0
           3.979 ( 0.048 ms): 6724 open(filename: 208733843841, flags: 0, mode: 1                        ) = 3
           4.071 ( 0.075 ms): 6724 open(filename: 139744419925673, flags: 0, mode: 0                     ) = 3
           4.318 ( 0.056 ms): 6724 nanosleep(rqtp: 140734030404608, rmtp: 0                              ) = 0
      [acme@sandy linux]$ perf trace --duration 0.100 usleep 1
           1.143 ( 1.021 ms): 6726 execve(arg0: 140736323962279, arg1: 140736323972752, arg2: 34926752, arg3: 140736323961824, arg4: 7955998171588342573, arg5: 6725) = 0
      [acme@sandy linux]$
      
      Cherry picked from tmp.perf/trace2 branch.
      
      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@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/n/tip-oslw2j2958we9qf0ctra4whd@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ae9ed035
  13. 27 9月, 2012 1 次提交
    • A
      perf trace: New tool · 514f1c67
      Arnaldo Carvalho de Melo 提交于
      Initially should look loosely like the venerable 'strace' tool, but
      using the infrastructure in the perf tools to allow tracing extra
      targets:
      
        [acme@sandy linux]$ perf trace --hell
        Error: unknown option `hell'
      
         usage: perf trace <PID>
      
            -p, --pid <pid>       trace events on existing process id
                --tid <tid>       trace events on existing thread id
                --all-cpus        system-wide collection from all CPUs
                --cpu <cpu>       list of cpus to monitor
                --no-inherit      child tasks do not inherit counters
                --mmap-pages <n>  number of mmap data pages
                --uid <user>      user to profile
      
        [acme@sandy linux]$
      
      Those should have the same semantics as when using with 'perf record'.
      
      It gets stuck sometimes, but hey, it works sometimes too!
      
      In time it should support perf.data based workloads, i.e. it should have
      a:
      	-o filename
      
      Command line option that will produce a perf.data file that can then be
      used with 'perf trace' or any of the other perf tools (script, report,
      etc).
      
      It will also eventually have the set of functionalities described in the
      previous 'trace' prototype by Thomas Gleixner:
      
         "Announcing a new utility: 'trace'"
         http://lwn.net/Articles/415728/
      
      Also planned is to have some of the features suggested in the comments
      of that LWN article.
      
      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@gmail.com>
      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: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/n/tip-v9x3q9rv4caxtox7wtjpchq5@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      514f1c67
  14. 02 12月, 2010 1 次提交
  15. 17 11月, 2010 1 次提交
  16. 10 11月, 2010 1 次提交
  17. 05 5月, 2010 1 次提交
  18. 25 2月, 2010 1 次提交
  19. 24 2月, 2010 1 次提交
    • T
      perf/scripts: Fix supported language listing option · f526d68b
      Tom Zanussi 提交于
      'perf trace -s list' prints a list of the supported scripting
      languages.  One problem with it is that it falls through and prints
      the trace as well.  The use of 'list' for this also makes it easy to
      confuse with 'perf trace -l', used for listing available scripts.  So
      change 'perf trace -s list' to 'perf trace -s lang' and fixes the
      fall-through problem.
      Signed-off-by: NTom Zanussi <tzanussi@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1264580883-15324-2-git-send-email-tzanussi@gmail.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      f526d68b
  20. 15 12月, 2009 1 次提交
  21. 28 11月, 2009 1 次提交
  22. 13 9月, 2009 1 次提交
    • I
      perf: Add 'perf sched' tool · 0a02ad93
      Ingo Molnar 提交于
      This turn-key tool allows scheduler measurements to be
      conducted and the results be displayed numerically.
      
      First baby step towards that goal: clone the new command off of
      perf trace.
      
      Fix a few other details along the way:
      
       - add (minimal) perf trace documentation
      
       - reorder a few places
      
       - list perf trace in the mainporcelain list as well
         as it's a very useful utility.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0a02ad93