aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 896f27047ed6..6aa6fb6f7bd9 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -37,6 +37,10 @@
37# define MADV_UNMERGEABLE 13 37# define MADV_UNMERGEABLE 13
38#endif 38#endif
39 39
40#ifndef EFD_SEMAPHORE
41# define EFD_SEMAPHORE 1
42#endif
43
40struct tp_field { 44struct tp_field {
41 int offset; 45 int offset;
42 union { 46 union {
@@ -279,6 +283,11 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
279 283
280#define SCA_STRARRAY syscall_arg__scnprintf_strarray 284#define SCA_STRARRAY syscall_arg__scnprintf_strarray
281 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 */
282static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size, 291static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
283 struct syscall_arg *arg) 292 struct syscall_arg *arg)
284{ 293{
@@ -286,6 +295,7 @@ static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
286} 295}
287 296
288#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray 297#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
298#endif /* defined(__i386__) || defined(__x86_64__) */
289 299
290static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, 300static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
291 struct syscall_arg *arg); 301 struct syscall_arg *arg);
@@ -839,6 +849,10 @@ static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscal
839 849
840#define SCA_SIGNUM syscall_arg__scnprintf_signum 850#define SCA_SIGNUM syscall_arg__scnprintf_signum
841 851
852#if defined(__i386__) || defined(__x86_64__)
853/*
854 * FIXME: Make this available to all arches.
855 */
842#define TCGETS 0x5401 856#define TCGETS 0x5401
843 857
844static const char *tioctls[] = { 858static const char *tioctls[] = {
@@ -860,6 +874,7 @@ static const char *tioctls[] = {
860}; 874};
861 875
862static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); 876static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401);
877#endif /* defined(__i386__) || defined(__x86_64__) */
863 878
864#define STRARRAY(arg, name, array) \ 879#define STRARRAY(arg, name, array) \
865 .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \ 880 .arg_scnprintf = { [arg] = SCA_STRARRAY, }, \
@@ -941,9 +956,16 @@ static struct syscall_fmt {
941 { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), }, 956 { .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), },
942 { .name = "ioctl", .errmsg = true, 957 { .name = "ioctl", .errmsg = true,
943 .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 */
944 [1] = SCA_STRHEXARRAY, /* cmd */ 963 [1] = SCA_STRHEXARRAY, /* cmd */
945 [2] = SCA_HEX, /* arg */ }, 964 [2] = SCA_HEX, /* arg */ },
946 .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, }, 965 .arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, },
966#else
967 [2] = SCA_HEX, /* arg */ }, },
968#endif
947 { .name = "kill", .errmsg = true, 969 { .name = "kill", .errmsg = true,
948 .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, }, 970 .arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, },
949 { .name = "linkat", .errmsg = true, 971 { .name = "linkat", .errmsg = true,