]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
perf trace beautify ioctl: Beautify sound ioctl's 'cmd' arg
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 31 Jul 2017 20:34:47 +0000 (17:34 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 1 Aug 2017 16:02:40 +0000 (13:02 -0300)
commit2c3e96291164d46e58ea064b778d5f8f747d6c6a
treefe47a3b6ad0becd11258206da13723fe84c63105
parenta215684e10484149313068e0a9ea1978ee36d4f7
perf trace beautify ioctl: Beautify sound ioctl's 'cmd' arg

This time we try a new approach, using a copy of uapi/sound/asound.h we
auto generate the string tables, then include it in the ioctl cmd
beautifier.

This way either the sound 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.

E.g.:

  # perf trace -p 22084 -e ioctl 2>&1 | head -5
     0.000 ( 0.068 ms): alsa-sink-ALC3/22084 ioctl(fd: 49</dev/snd/pcmC1D0p>, cmd: SNDRV_PCM_HWSYNC, arg: 0x557f8d7fa0f0) = 0
     0.344 ( 0.041 ms): alsa-sink-ALC3/22084 ioctl(fd: 46</dev/snd/controlC1>, cmd: SNDRV_CTL_ELEM_READ, arg: 0x7fe764018ee0) = 0
     0.403 ( 0.011 ms): alsa-sink-ALC3/22084 ioctl(fd: 49</dev/snd/pcmC1D0p>, cmd: SNDRV_PCM_HWSYNC, arg: 0x557f8d7fa0f0) = 0
     0.427 ( 0.009 ms): alsa-sink-ALC3/22084 ioctl(fd: 49</dev/snd/pcmC1D0p>, cmd: SNDRV_PCM_STATUS_EXT, arg: 0x7fe76c2e0b30) = 0
     2.461 ( 0.042 ms): alsa-sink-ALC3/22084 ioctl(fd: 49</dev/snd/pcmC1D0p>, cmd: SNDRV_PCM_HWSYNC, arg: 0x557f8d7fa0f0) = 0
  #

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-8zuyf3e3u6jjcb2xzerw0kdi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.perf
tools/perf/trace/beauty/ioctl.c
tools/perf/trace/beauty/sndrv_ctl_ioctl.sh [new file with mode: 0755]
tools/perf/trace/beauty/sndrv_pcm_ioctl.sh [new file with mode: 0755]