Arnaldo Carvalho de Melo
27702bcfe8
perf trace: Support syscall name globbing
So now we can use:
# perf trace -e pkey_*
532.784 ( 0.006 ms): pkey/16018 pkey_alloc(init_val: DISABLE_WRITE) = -1 EINVAL Invalid argument
532.795 ( 0.004 ms): pkey/16018 pkey_mprotect(start: 0x7f380d0a6000, len: 4096, prot: READ|WRITE, pkey: -1) = 0
532.801 ( 0.002 ms): pkey/16018 pkey_free(pkey: -1 ) = -1 EINVAL Invalid argument
^C[root@jouet ~]#
Or '-e epoll*', '-e *msg*', etc.
Combining syscall names with perf events, tracepoints, etc, continues to
be valid, i.e. this is possible:
# perf probe -L sys_nanosleep
<SyS_nanosleep@/home/acme/git/linux/kernel/time/hrtimer.c:0>
0 SYSCALL_DEFINE2(nanosleep, struct timespec __user *, rqtp,
struct timespec __user *, rmtp)
{
struct timespec64 tu;
5 if (get_timespec64(&tu, rqtp))
6 return -EFAULT;
if (!timespec64_valid(&tu))
9 return -EINVAL;
11 current->restart_block.nanosleep.type = rmtp ? TT_NATIVE : TT_NONE;
12 current->restart_block.nanosleep.rmtp = rmtp;
13 return hrtimer_nanosleep(&tu, HRTIMER_MODE_REL, CLOCK_MONOTONIC);
}
# perf probe my_probe="sys_nanosleep:12 rmtp"
Added new event:
probe:my_probe (on sys_nanosleep:12 with rmtp)
You can now use it in all perf tools, such as:
perf record -e probe:my_probe -aR sleep 1
#
# perf trace -e probe:my_probe/max-stack=5/,*sleep sleep 1
0.427 ( 0.003 ms): sleep/16690 nanosleep(rqtp: 0x7ffefc245090) ...
0.430 ( ): probe:my_probe:(ffffffffbd112923) rmtp=0)
sys_nanosleep ([kernel.kallsyms])
do_syscall_64 ([kernel.kallsyms])
return_from_SYSCALL_64 ([kernel.kallsyms])
__nanosleep_nocancel (/usr/lib64/libc-2.25.so)
0.427 (1000.208 ms): sleep/16690 ... [continued]: nanosleep()) = 0
#
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-elycoi8wy6y0w9dkj7ox1mzz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-09-01 14:45:58 -03:00
..
2017-08-11 16:06:32 -03:00
2017-06-19 15:27:06 -03:00
2017-09-01 14:45:58 -03:00
2017-06-27 11:55:06 -03:00
2017-08-22 12:25:11 -03:00
2016-07-12 16:23:35 -03:00
2017-08-15 17:03:38 -03:00
2017-08-22 13:23:10 -03:00
2017-08-28 16:44:47 -03:00
2017-08-30 10:03:27 -03:00
2017-09-01 14:45:48 -03:00
2017-03-13 10:59:36 -03:00
2017-07-18 23:13:52 -03:00
2017-08-18 11:15:09 -03:00
2017-03-27 11:58:09 -03:00
2017-07-18 23:14:11 -03:00
2017-04-19 13:01:51 -03:00
2017-06-27 11:22:31 -03:00
2017-07-20 15:46:10 -03:00
2017-07-28 16:30:45 -03:00
2017-06-27 11:44:58 -03:00
2017-03-27 11:58:09 -03:00
2017-07-20 15:46:10 -03:00
2017-07-20 15:46:10 -03:00
2017-07-18 23:14:36 -03:00
2017-04-19 13:01:46 -03:00
2017-07-12 16:26:03 -07:00
2017-04-24 13:43:34 -03:00
2017-03-27 11:58:09 -03:00
2017-04-19 13:01:51 -03:00
2017-04-24 13:43:35 -03:00
2017-07-18 23:14:11 -03:00
2017-07-18 23:14:36 -03:00
2017-08-28 16:44:44 -03:00
2017-06-27 11:22:31 -03:00
2017-07-25 22:43:17 -03:00
2017-07-26 14:25:44 -03:00
2017-04-24 13:43:35 -03:00
2017-07-25 22:43:16 -03:00
2017-09-01 14:45:58 -03:00
2017-04-24 13:43:33 -03:00
2017-04-24 13:43:33 -03:00
2017-08-01 13:04:56 -03:00
2017-03-13 10:59:31 -03:00
2016-02-04 15:57:00 -03:00
2017-08-28 16:44:46 -03:00
2017-08-28 16:44:47 -03:00
2017-08-01 13:04:56 -03:00
2017-08-17 16:58:21 -03:00
2015-08-06 16:48:27 -03:00
2017-07-20 15:46:10 -03:00
2017-07-18 23:14:15 -03:00