]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf trace beauty ioctl: Improve 'cmd' beautifier
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 31 Jul 2017 16:20:14 +0000 (13:20 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 1 Aug 2017 12:47:52 +0000 (09:47 -0300)
commit1cc47f2d46206d67285aea0ca7e8450af571da13
treef14ec1d1bebcdd1cc78599daf224667597e379f9
parentf1d6cb2d8cdfb210f9b4a0f59e9168ac0f5db774
perf trace beauty ioctl: Improve 'cmd' beautifier

By using the _IOC_(DIR,NR,TYPE,SIZE) macros to lookup a 'type' keyed
table that then gets indexed by 'nr', falling back to a notation similar
to the one used by 'strace', only more compact, i.e.:

   474.356 ( 0.007 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: (READ|WRITE, 0x64, 0xae, 0x1c), arg: 0x7ffc934f7880) = 0
   474.369 ( 0.053 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: (READ|WRITE, 0x64, 0xb0, 0x18), arg: 0x7ffc934f77d0) = 0
   505.055 ( 0.014 ms): gnome-shell/22401 ioctl(fd: 8</dev/dri/card0>, cmd: (READ|WRITE, 0x64, 0xaf, 0x4), arg: 0x7ffc934f741c) = 0

This also moves it out of builtin-trace.c and into trace/beauty/ioctl.c
to better compartimentalize all these formatters.

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-s3enursdxsvnhdomh6qlte4g@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c
tools/perf/trace/beauty/Build
tools/perf/trace/beauty/beauty.h
tools/perf/trace/beauty/ioctl.c [new file with mode: 0644]