linux-stable/tools
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
..
accounting
arch tools headers: Sync cpu features kernel ABI headers with tooling headers 2017-08-28 16:44:46 -03:00
build tools build tests: Don't hardcode gcc name 2017-08-28 16:44:44 -03:00
cgroup
firewire
gpio gpio-hammer: fix make consumer_label suitable to work on gpio-nails 2017-01-26 16:29:09 +01:00
hv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
iio iio: tools: generic_buffer: increase trigger length 2017-05-07 16:08:04 +01:00
include perf tools: Add support for printing new mem_info encodings 2017-08-22 12:30:25 -03:00
kvm/kvm_stat tools/kvm_stat: add '-f help' to get the available event list 2017-07-26 19:04:53 +02:00
laptop
leds tools/leds: Add led_hw_brightness_mon program 2017-02-14 22:20:23 +01:00
lguest Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
lib perf tools: Robustify detection of clang binary 2017-08-28 16:44:46 -03:00
net tools: bpf_jit_disasm: Handle large images. 2017-06-14 15:03:22 -04:00
nfsd
objtool objtool: Fix '-mtune=atom' decoding support in objtool 2.0 2017-08-21 16:07:27 +02:00
pci tools: PCI: Add sample test script to invoke pcitest 2017-04-28 10:23:20 -05:00
pcmcia
perf perf trace: Support syscall name globbing 2017-09-01 14:45:58 -03:00
power ACPI updates for v4.13-rc1 2017-07-04 14:16:49 -07:00
scripts perf tools: Robustify detection of clang binary 2017-08-28 16:44:46 -03:00
spi spi: spidev_test: add option to continuously transfer data 2017-03-21 18:44:40 +00:00
testing NTB bug fixes to address an incorrect ntb_mw_count reference in the NTB 2017-08-27 17:01:54 -07:00
thermal/tmon
time
usb usb: changes for v4.13 merge window 2017-06-20 11:39:34 +08:00
virtio tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" 2017-05-09 16:43:24 +03:00
vm tools/vm: add missing Makefile rules 2017-02-22 16:41:26 -08:00
Makefile tools: Add install make target for liblockdep 2017-06-05 09:28:08 +02:00