alistair23-linux/tools/perf
Arnaldo Carvalho de Melo ef9811f093 perf trace beauty ioctl: Beautify DRM ioctl cmds
This time we try a new approach, using uapi/drm/ copies of drm.h and
i915_drm.h we auto generate the string tables, then include it in the
ioctl cmd beautifier.

This way either the DRM developers will add the new commands to the
tools/ copy, like is happening with other areas of tools/include/ (bpf.h
comes to mind), or we'll be notified when building perf that our copy
drifted.

Either way the time from a new command being added to when 'perf trace'
gets to know it is greatly shortened, for instance:

  # strace -p 22401 -e ioctl
  ioctl(8, DRM_IOCTL_I915_GEM_BUSY, 0x7ffc934f7600) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7ffc934f7550) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_SW_FINISH, 0x7ffc934f76e0) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_SW_FINISH, 0x7ffc934f7780) = 0
  ioctl(8, _IOC(_IOC_READ|_IOC_WRITE, 0x64, 0x69, 0x40), 0x7ffc934f7700) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7ffc934f7780) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffc934f76f0) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_BUSY, 0x7ffc934f76c0) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_MADVISE, 0x7ffc934f76b0) = 0
  ioctl(8, DRM_IOCTL_I915_GEM_SET_DOMAIN, 0x7ffc934f76d0) = 0
  ioctl(8, DRM_IOCTL_MODE_ADDFB, 0x7ffc934f7880) = 0
  ioctl(8, DRM_IOCTL_MODE_PAGE_FLIP, 0x7ffc934f77d0) = 0
  ^Cstrace: Process 22401 detached

versus:

  # perf trace -p 22401 -e ioctl
  1010.856 (0.006 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_BUSY, arg: 0x7ffc934f7600) = 0
  1010.865 (0.003 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_SET_DOMAIN, arg: 0x7ffc934f7550) = 0
  1010.872 (0.002 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_SW_FINISH, arg: 0x7ffc934f76e0) = 0
  1010.939 (0.015 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_SW_FINISH, arg: 0x7ffc934f7780) = 0
  1010.959 (0.085 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_EXECBUFFER2, arg: 0x7ffc934f7700) = 0
  1011.048 (0.003 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_SET_DOMAIN, arg: 0x7ffc934f7780) = 0
  1011.056 (0.002 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_MADVISE, arg: 0x7ffc934f76f0) = 0
  1011.060 (0.002 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_BUSY, arg: 0x7ffc934f76c0) = 0
  1011.064 (0.003 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_MADVISE, arg: 0x7ffc934f76b0) = 0
  1011.068 (0.002 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_SET_DOMAIN, arg: 0x7ffc934f76d0) = 0
  1011.074 (0.009 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_MODE_ADDFB, arg: 0x7ffc934f7880 ) = 0
  1011.096 (0.072 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_MODE_PAGE_FLIP, arg: 0x7ffc934f77d0) = 0
^C[root@jouet linux]#

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.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-mly2d7v9kf28rso81dijbixq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-08-01 13:02:05 -03:00
..
arch perf build: Clarify open-coded header version warning message 2017-07-31 10:30:06 -03:00
bench perf tools: Use __maybe_unused consistently 2017-06-19 15:27:06 -03:00
Documentation perf top: Support lookup of symbols in other mount namespaces. 2017-07-25 22:43:16 -03:00
jvmti perf jit: fix typo: "incalid" -> "invalid" 2017-06-27 11:55:06 -03:00
pmu-events perf jevents: Make build fail on JSON parse error 2017-07-25 22:46:36 -03:00
python
scripts perf intel-pt: Add example script for power events and PTWRITE 2017-06-30 11:50:53 -03:00
tests perf tests attr: Add optional term 2017-07-18 23:14:22 -03:00
trace perf trace beauty ioctl: Beautify DRM ioctl cmds 2017-08-01 13:02:05 -03:00
ui perf annotate TUI: Set appropriate column width for period/percent 2017-07-28 13:19:32 -03:00
util perf data: Add mmap[2] events to CTF conversion 2017-07-28 16:26:06 -03:00
.gitignore
Build perf trace: Only build tools/perf/trace/beauty/ when building 'perf trace' 2017-07-18 23:13:52 -03:00
builtin-annotate.c perf annotate: Do not overwrite perf_sample->weight 2017-07-26 16:52:25 -03:00
builtin-bench.c
builtin-buildid-cache.c perf buildid-cache: Cache debuginfo 2017-07-18 23:14:11 -03:00
builtin-buildid-list.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
builtin-c2c.c perf tools: Replace error() with pr_err() 2017-06-27 11:22:31 -03:00
builtin-config.c tools include: Adopt strstarts() from the kernel 2017-07-20 15:46:10 -03:00
builtin-data.c perf data: Add doc when no conversion support compiled 2017-07-28 16:30:45 -03:00
builtin-diff.c perf config: Do not die when parsing u64 or int config values 2017-06-27 11:44:58 -03:00
builtin-evlist.c
builtin-ftrace.c tools include: Adopt strstarts() from the kernel 2017-07-20 15:46:10 -03:00
builtin-help.c tools include: Adopt strstarts() from the kernel 2017-07-20 15:46:10 -03:00
builtin-inject.c perf tools: Add feature header record to pipe-mode 2017-07-18 23:14:36 -03:00
builtin-kallsyms.c
builtin-kmem.c mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic 2017-07-12 16:26:03 -07:00
builtin-kvm.c perf tools: Remove poll.h and wait.h from util.h 2017-04-24 13:43:34 -03:00
builtin-list.c
builtin-lock.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
builtin-mem.c perf tools: Use just forward declarations for struct thread where possible 2017-04-24 13:43:35 -03:00
builtin-probe.c perf buildid-cache: Support binary objects from other namespaces 2017-07-18 23:14:11 -03:00
builtin-record.c perf tools: Add feature header record to pipe-mode 2017-07-18 23:14:36 -03:00
builtin-report.c perf report: Make --branch-history work without callgraphs(-g) option in perf record 2017-07-25 22:46:03 -03:00
builtin-sched.c perf tools: Replace error() with pr_err() 2017-06-27 11:22:31 -03:00
builtin-script.c perf script: Remove some bogus error handling 2017-07-25 22:43:17 -03:00
builtin-stat.c perf stat: Use group read for event groups 2017-07-26 14:25:44 -03:00
builtin-timechart.c perf tools: Use just forward declarations for struct thread where possible 2017-04-24 13:43:35 -03:00
builtin-top.c perf top: Support lookup of symbols in other mount namespaces. 2017-07-25 22:43:16 -03:00
builtin-trace.c perf trace beauty ioctl: Improve 'cmd' beautifier 2017-08-01 09:47:52 -03:00
builtin-version.c perf tools: Remove string.h, unistd.h and sys/stat.h from util.h 2017-04-24 13:43:33 -03:00
builtin.h perf tools: Remove stale prototypes from builtin.h 2017-04-24 13:43:33 -03:00
check-headers.sh tools include uapi: Grab copies of drm/{drm,i915_drm}.h 2017-08-01 09:47:56 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config tools build: Add test for setns() 2017-07-18 23:14:08 -03:00
Makefile.perf perf trace beauty ioctl: Beautify DRM ioctl cmds 2017-08-01 13:02:05 -03:00
MANIFEST tools include uapi: Grab copies of drm/{drm,i915_drm}.h 2017-08-01 09:47:56 -03:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c tools include: Adopt strstarts() from the kernel 2017-07-20 15:46:10 -03:00
perf.h perf tests attr: Add test_attr__ready function 2017-07-18 23:14:15 -03:00