diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-01-22 14:50:16 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-01-25 04:37:31 -0500 |
commit | c19d0847b2dce3dc4219fa1a21f4ad2256b42d9d (patch) | |
tree | 4f4942756cba960bf1ed5c57b8e70b4fe9cb0132 /tools | |
parent | bafae98e7a95df74ce4529ae96251cb12c86fdf3 (diff) |
perf trace beauty flock: Move to separate object file
To resolve some header conflicts that were preventing the build to
succeed in the Alpine Linux distribution.
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: https://lkml.kernel.org/n/tip-bvud0dvzvip3kibeplupdbmc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-trace.c | 1 | ||||
-rw-r--r-- | tools/perf/trace/beauty/Build | 1 | ||||
-rw-r--r-- | tools/perf/trace/beauty/beauty.h | 3 | ||||
-rw-r--r-- | tools/perf/trace/beauty/flock.c | 10 |
4 files changed, 9 insertions, 6 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 868306ccd8b8..17d11deeb88d 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -548,7 +548,6 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size, | |||
548 | 548 | ||
549 | #include "trace/beauty/arch_errno_names.c" | 549 | #include "trace/beauty/arch_errno_names.c" |
550 | #include "trace/beauty/eventfd.c" | 550 | #include "trace/beauty/eventfd.c" |
551 | #include "trace/beauty/flock.c" | ||
552 | #include "trace/beauty/futex_op.c" | 551 | #include "trace/beauty/futex_op.c" |
553 | #include "trace/beauty/futex_val3.c" | 552 | #include "trace/beauty/futex_val3.c" |
554 | #include "trace/beauty/mmap.c" | 553 | #include "trace/beauty/mmap.c" |
diff --git a/tools/perf/trace/beauty/Build b/tools/perf/trace/beauty/Build index 066bbf0f4a74..66330d4b739b 100644 --- a/tools/perf/trace/beauty/Build +++ b/tools/perf/trace/beauty/Build | |||
@@ -1,5 +1,6 @@ | |||
1 | libperf-y += clone.o | 1 | libperf-y += clone.o |
2 | libperf-y += fcntl.o | 2 | libperf-y += fcntl.o |
3 | libperf-y += flock.o | ||
3 | ifeq ($(SRCARCH),$(filter $(SRCARCH),x86)) | 4 | ifeq ($(SRCARCH),$(filter $(SRCARCH),x86)) |
4 | libperf-y += ioctl.o | 5 | libperf-y += ioctl.o |
5 | endif | 6 | endif |
diff --git a/tools/perf/trace/beauty/beauty.h b/tools/perf/trace/beauty/beauty.h index d8f6b2ec7fc5..984a504d335c 100644 --- a/tools/perf/trace/beauty/beauty.h +++ b/tools/perf/trace/beauty/beauty.h | |||
@@ -79,6 +79,9 @@ size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_ar | |||
79 | size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg); | 79 | size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg); |
80 | #define SCA_FCNTL_ARG syscall_arg__scnprintf_fcntl_arg | 80 | #define SCA_FCNTL_ARG syscall_arg__scnprintf_fcntl_arg |
81 | 81 | ||
82 | size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg); | ||
83 | #define SCA_FLOCK syscall_arg__scnprintf_flock | ||
84 | |||
82 | size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg); | 85 | size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg); |
83 | #define SCA_IOCTL_CMD syscall_arg__scnprintf_ioctl_cmd | 86 | #define SCA_IOCTL_CMD syscall_arg__scnprintf_ioctl_cmd |
84 | 87 | ||
diff --git a/tools/perf/trace/beauty/flock.c b/tools/perf/trace/beauty/flock.c index f9707f57566c..c4ff6ad30b06 100644 --- a/tools/perf/trace/beauty/flock.c +++ b/tools/perf/trace/beauty/flock.c | |||
@@ -1,5 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | 1 | // SPDX-License-Identifier: GPL-2.0 |
2 | #include <fcntl.h> | 2 | |
3 | #include "trace/beauty/beauty.h" | ||
4 | #include <linux/kernel.h> | ||
5 | #include <uapi/linux/fcntl.h> | ||
3 | 6 | ||
4 | #ifndef LOCK_MAND | 7 | #ifndef LOCK_MAND |
5 | #define LOCK_MAND 32 | 8 | #define LOCK_MAND 32 |
@@ -17,8 +20,7 @@ | |||
17 | #define LOCK_RW 192 | 20 | #define LOCK_RW 192 |
18 | #endif | 21 | #endif |
19 | 22 | ||
20 | static size_t syscall_arg__scnprintf_flock(char *bf, size_t size, | 23 | size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg) |
21 | struct syscall_arg *arg) | ||
22 | { | 24 | { |
23 | int printed = 0, op = arg->val; | 25 | int printed = 0, op = arg->val; |
24 | 26 | ||
@@ -45,5 +47,3 @@ static size_t syscall_arg__scnprintf_flock(char *bf, size_t size, | |||
45 | 47 | ||
46 | return printed; | 48 | return printed; |
47 | } | 49 | } |
48 | |||
49 | #define SCA_FLOCK syscall_arg__scnprintf_flock | ||