diff options
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 619d11c47a91..6aa6fb6f7bd9 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -283,6 +283,11 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size, | |||
283 | 283 | ||
284 | #define SCA_STRARRAY syscall_arg__scnprintf_strarray | 284 | #define SCA_STRARRAY syscall_arg__scnprintf_strarray |
285 | 285 | ||
286 | #if defined(__i386__) || defined(__x86_64__) | ||
287 | /* | ||
288 | * FIXME: Make this available to all arches as soon as the ioctl beautifier | ||
289 | * gets rewritten to support all arches. | ||
290 | */ | ||
286 | static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, | 291 | static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, |
287 | struct syscall_arg *arg) | 292 | struct syscall_arg *arg) |
288 | { | 293 | { |
@@ -290,6 +295,7 @@ static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, | |||
290 | } | 295 | } |
291 | 296 | ||
292 | #define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray | 297 | #define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray |
298 | #endif /* defined(__i386__) || defined(__x86_64__) */ | ||
293 | 299 | ||
294 | static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, | 300 | static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, |
295 | struct syscall_arg *arg); | 301 | struct syscall_arg *arg); |
@@ -843,6 +849,10 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal | |||
843 | 849 | ||
844 | #define SCA_SIGNUM syscall_arg__scnprintf_signum | 850 | #define SCA_SIGNUM syscall_arg__scnprintf_signum |
845 | 851 | ||
852 | #if defined(__i386__) || defined(__x86_64__) | ||
853 | /* | ||
854 | * FIXME: Make this available to all arches. | ||
855 | */ | ||
846 | #define TCGETS 0x5401 | 856 | #define TCGETS 0x5401 |
847 | 857 | ||
848 | static const char *tioctls[] = { | 858 | static const char *tioctls[] = { |
@@ -864,6 +874,7 @@ static const char *tioctls[] = { | |||
864 | }; | 874 | }; |
865 | 875 | ||
866 | static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); | 876 | static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); |
877 | #endif /* defined(__i386__) || defined(__x86_64__) */ | ||
867 | 878 | ||
868 | #define STRARRAY(arg, name, array) \ | 879 | #define STRARRAY(arg, name, array) \ |
869 | .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ | 880 | .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ |
@@ -945,9 +956,16 @@ static struct syscall_fmt { | |||
945 | { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, | 956 | { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, |
946 | { .name = "ioctl", .errmsg = true, | 957 | { .name = "ioctl", .errmsg = true, |
947 | .arg_scnprintf = { [0] = SCA_FD, /* fd */ | 958 | .arg_scnprintf = { [0] = SCA_FD, /* fd */ |
959 | #if defined(__i386__) || defined(__x86_64__) | ||
960 | /* | ||
961 | * FIXME: Make this available to all arches. | ||
962 | */ | ||
948 | [1] = SCA_STRHEXARRAY, /* cmd */ | 963 | [1] = SCA_STRHEXARRAY, /* cmd */ |
949 | [2] = SCA_HEX, /* arg */ }, | 964 | [2] = SCA_HEX, /* arg */ }, |
950 | .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, | 965 | .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, |
966 | #else | ||
967 | [2] = SCA_HEX, /* arg */ }, }, | ||
968 | #endif | ||
951 | { .name = "kill", .errmsg = true, | 969 | { .name = "kill", .errmsg = true, |
952 | .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, | 970 | .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, |
953 | { .name = "linkat", .errmsg = true, | 971 | { .name = "linkat", .errmsg = true, |