diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-08-10 17:07:02 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-10 17:07:02 +0200 |
commit | 82119cbe8e1e32cc2a941393e59816e731681310 (patch) | |
tree | 66284cba95a22a17e0a8401d1af59cc3feb75e8b /tools/perf/builtin-trace.c | |
parent | d9f5f32a7d17f4906a21ad59589853639a1328a0 (diff) | |
parent | 81e3d8b2af2e7417f1d5164aab5c1a75955e8a5d (diff) | |
download | kernel_replicant_linux-82119cbe8e1e32cc2a941393e59816e731681310.tar.gz kernel_replicant_linux-82119cbe8e1e32cc2a941393e59816e731681310.tar.bz2 kernel_replicant_linux-82119cbe8e1e32cc2a941393e59816e731681310.zip |
Merge tag 'perf-core-for-mingo-4.14-20170801' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements from Arnaldo Carvalho de Melo:
User visible changes:
- Beautifiers for the 'cmd' arg of several ioctl types, including:
sound, DRM, KVM, vhost virtio and perf_events.
This was done by using scripts that extract the information from
the UAPI headers, generating string tables that are then used in
the 'perf trace' syscall argument ioctl beautifier.
More work needed to further use it, for instance, to use the
_IOC_DIR value where it is used sanely to suppress the third
argument, to set formatters for non-pointer values and ultimately
for using eBPF + pahole-like code to collect + beautify structs in
the third arg.
Using the current scheme of having tools/ copies of kernel headers
we'll make sure tooling stays working when changes are made to the
kernel ABI headers and will be notified when they get changed,
reducing the time for 'perf trace' to support new ABIs and allowing
the tools/perf/ codebase to have the definitions it needs to
build in dozens of distros/versions, as routinely tested using
containers for, at this time, 47 environments. (Arnaldo Carvalho de Melo)
Infrastructure changes:
- Clarify header version warning message (Ingo Molnar)
- Sync kernel ABI headers with tooling headers (Ingo Molnar, Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 05d24b6570ee..de02413a25d3 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -338,20 +338,6 @@ size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size, return scnprintf(bf, size, "%d", arg->val); } -#if defined(__i386__) || defined(__x86_64__) -/* - * FIXME: Make this available to all arches as soon as the ioctl beautifier - * gets rewritten to support all arches. - */ -static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, - struct syscall_arg *arg) -{ - return __syscall_arg__scnprintf_strarray(bf, size, "%#x", arg); -} - -#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray -#endif /* defined(__i386__) || defined(__x86_64__) */ - #ifndef AT_FDCWD #define AT_FDCWD -100 #endif @@ -525,33 +511,6 @@ static size_t syscall_arg__scnprintf_pipe_flags(char *bf, size_t size, #define SCA_PIPE_FLAGS syscall_arg__scnprintf_pipe_flags -#if defined(__i386__) || defined(__x86_64__) -/* - * FIXME: Make this available to all arches. - */ -#define TCGETS 0x5401 - -static const char *tioctls[] = { - "TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW", - "TCSETAF", "TCSBRK", "TCXONC", "TCFLSH", "TIOCEXCL", "TIOCNXCL", - "TIOCSCTTY", "TIOCGPGRP", "TIOCSPGRP", "TIOCOUTQ", "TIOCSTI", - "TIOCGWINSZ", "TIOCSWINSZ", "TIOCMGET", "TIOCMBIS", "TIOCMBIC", - "TIOCMSET", "TIOCGSOFTCAR", "TIOCSSOFTCAR", "FIONREAD", "TIOCLINUX", - "TIOCCONS", "TIOCGSERIAL", "TIOCSSERIAL", "TIOCPKT", "FIONBIO", - "TIOCNOTTY", "TIOCSETD", "TIOCGETD", "TCSBRKP", [0x27] = "TIOCSBRK", - "TIOCCBRK", "TIOCGSID", "TCGETS2", "TCSETS2", "TCSETSW2", "TCSETSF2", - "TIOCGRS485", "TIOCSRS485", "TIOCGPTN", "TIOCSPTLCK", - "TIOCGDEV||TCGETX", "TCSETX", "TCSETXF", "TCSETXW", "TIOCSIG", - "TIOCVHANGUP", "TIOCGPKT", "TIOCGPTLCK", "TIOCGEXCL", - [0x50] = "FIONCLEX", "FIOCLEX", "FIOASYNC", "TIOCSERCONFIG", - "TIOCSERGWILD", "TIOCSERSWILD", "TIOCGLCKTRMIOS", "TIOCSLCKTRMIOS", - "TIOCSERGSTRUCT", "TIOCSERGETLSR", "TIOCSERGETMULTI", "TIOCSERSETMULTI", - "TIOCMIWAIT", "TIOCGICOUNT", [0x60] = "FIOQSIZE", -}; - -static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); -#endif /* defined(__i386__) || defined(__x86_64__) */ - #ifndef GRND_NONBLOCK #define GRND_NONBLOCK 0x0001 #endif @@ -670,8 +629,7 @@ static struct syscall_fmt { /* * FIXME: Make this available to all arches. */ - [1] = { .scnprintf = SCA_STRHEXARRAY, /* cmd */ - .parm = &strarray__tioctls, }, + [1] = { .scnprintf = SCA_IOCTL_CMD, /* cmd */ }, [2] = { .scnprintf = SCA_HEX, /* arg */ }, }, }, #else [2] = { .scnprintf = SCA_HEX, /* arg */ }, }, }, |