diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-20 11:02:09 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-20 14:16:32 -0400 |
| commit | 005438a8eef063495ac059d128eea71b58de50e5 (patch) | |
| tree | 2becf82f62cda11a67cb7ac034e029254e1a5f68 /tools/perf/config | |
| parent | 8816d38d49d37e255d98d0204af2acba7094385b (diff) | |
perf trace: Support 'strace' syscall event groups
I.e.:
$ cat ~/share/perf-core/strace/groups/file
access
chmod
creat
execve
faccessat
getcwd
lstat
mkdir
open
openat
quotactl
readlink
rename
rmdir
stat
statfs
symlink
unlink
$
Then, on a quiet desktop, try running this and then moving your mouse to
see the deluge of mouse related activity:
# perf probe 'vfs_getname=getname_flags:72 pathname=filename:string'
Added new event:
probe:vfs_getname (on getname_flags:72 with pathname=filename:string)
You can now use it in all perf tools, such as:
perf record -e probe:vfs_getname -aR sleep 1
#
# trace --ev probe:vfs_getname --filter-pids 2232 -e file
0.042 (0.042 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
0.042 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/xterm")
0.100 (0.100 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
0.142 (0.018 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
0.142 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/index.theme")
0.192 (0.069 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
0.230 (0.017 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
0.230 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/usr/share/icons/Adwaita/cursors/xterm")
0.253 (0.041 ms): mousetweaks/2235 ... [continued]: open()) = 14
0.459 (0.008 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
0.459 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/left_side")
0.468 (0.017 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
Need to combine that raw_syscalls:sys_enter(open) + probe:vfs_getname +
raw_syscalls:sys_exit(open) sequence...
Now, if you're bored, please write some more syscall groups, like the ones
in 'strace' and send it our way :-)
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Milian Wolff <mail@milianw.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-a42xklu59lcbxp7bbnic74a8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/config')
| -rw-r--r-- | tools/perf/config/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 094ddaee104c..a9b93d1ecefa 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
| @@ -644,6 +644,7 @@ infodir = share/info | |||
| 644 | perfexecdir = libexec/perf-core | 644 | perfexecdir = libexec/perf-core |
| 645 | sharedir = $(prefix)/share | 645 | sharedir = $(prefix)/share |
| 646 | template_dir = share/perf-core/templates | 646 | template_dir = share/perf-core/templates |
| 647 | STRACE_GROUPS_DIR = share/perf-core/strace/groups | ||
| 647 | htmldir = share/doc/perf-doc | 648 | htmldir = share/doc/perf-doc |
| 648 | ifeq ($(prefix),/usr) | 649 | ifeq ($(prefix),/usr) |
| 649 | sysconfdir = /etc | 650 | sysconfdir = /etc |
| @@ -663,6 +664,7 @@ libdir = $(prefix)/$(lib) | |||
| 663 | 664 | ||
| 664 | # Shell quote (do not use $(call) to accommodate ancient setups); | 665 | # Shell quote (do not use $(call) to accommodate ancient setups); |
| 665 | ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) | 666 | ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) |
| 667 | STRACE_GROUPS_DIR_SQ = $(subst ','\'',$(STRACE_GROUPS_DIR)) | ||
| 666 | DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) | 668 | DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) |
| 667 | bindir_SQ = $(subst ','\'',$(bindir)) | 669 | bindir_SQ = $(subst ','\'',$(bindir)) |
| 668 | mandir_SQ = $(subst ','\'',$(mandir)) | 670 | mandir_SQ = $(subst ','\'',$(mandir)) |
| @@ -676,10 +678,13 @@ libdir_SQ = $(subst ','\'',$(libdir)) | |||
| 676 | 678 | ||
| 677 | ifneq ($(filter /%,$(firstword $(perfexecdir))),) | 679 | ifneq ($(filter /%,$(firstword $(perfexecdir))),) |
| 678 | perfexec_instdir = $(perfexecdir) | 680 | perfexec_instdir = $(perfexecdir) |
| 681 | STRACE_GROUPS_INSTDIR = $(STRACE_GROUPS_DIR) | ||
| 679 | else | 682 | else |
| 680 | perfexec_instdir = $(prefix)/$(perfexecdir) | 683 | perfexec_instdir = $(prefix)/$(perfexecdir) |
| 684 | STRACE_GROUPS_INSTDIR = $(prefix)/$(STRACE_GROUPS_DIR) | ||
| 681 | endif | 685 | endif |
| 682 | perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir)) | 686 | perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir)) |
| 687 | STRACE_GROUPS_INSTDIR_SQ = $(subst ','\'',$(STRACE_GROUPS_INSTDIR)) | ||
| 683 | 688 | ||
| 684 | # If we install to $(HOME) we keep the traceevent default: | 689 | # If we install to $(HOME) we keep the traceevent default: |
| 685 | # $(HOME)/.traceevent/plugins | 690 | # $(HOME)/.traceevent/plugins |
| @@ -713,6 +718,7 @@ $(call detected_var,htmldir_SQ) | |||
| 713 | $(call detected_var,infodir_SQ) | 718 | $(call detected_var,infodir_SQ) |
| 714 | $(call detected_var,mandir_SQ) | 719 | $(call detected_var,mandir_SQ) |
| 715 | $(call detected_var,ETC_PERFCONFIG_SQ) | 720 | $(call detected_var,ETC_PERFCONFIG_SQ) |
| 721 | $(call detected_var,STRACE_GROUPS_DIR_SQ) | ||
| 716 | $(call detected_var,prefix_SQ) | 722 | $(call detected_var,prefix_SQ) |
| 717 | $(call detected_var,perfexecdir_SQ) | 723 | $(call detected_var,perfexecdir_SQ) |
| 718 | $(call detected_var,LIBDIR) | 724 | $(call detected_var,LIBDIR) |
