Skip to content

Commit c19d084

Browse files
committed
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 <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent bafae98 commit c19d084

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

tools/perf/builtin-trace.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,6 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,
548548

549549
#include "trace/beauty/arch_errno_names.c"
550550
#include "trace/beauty/eventfd.c"
551-
#include "trace/beauty/flock.c"
552551
#include "trace/beauty/futex_op.c"
553552
#include "trace/beauty/futex_val3.c"
554553
#include "trace/beauty/mmap.c"

tools/perf/trace/beauty/Build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
libperf-y += clone.o
22
libperf-y += fcntl.o
3+
libperf-y += flock.o
34
ifeq ($(SRCARCH),$(filter $(SRCARCH),x86))
45
libperf-y += ioctl.o
56
endif

tools/perf/trace/beauty/beauty.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_ar
7979
size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg);
8080
#define SCA_FCNTL_ARG syscall_arg__scnprintf_fcntl_arg
8181

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+
8285
size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg);
8386
#define SCA_IOCTL_CMD syscall_arg__scnprintf_ioctl_cmd
8487

tools/perf/trace/beauty/flock.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// 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>
36

47
#ifndef LOCK_MAND
58
#define LOCK_MAND 32
@@ -17,8 +20,7 @@
1720
#define LOCK_RW 192
1821
#endif
1922

20-
static size_t syscall_arg__scnprintf_flock(char *bf, size_t size,
21-
struct syscall_arg *arg)
23+
size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg)
2224
{
2325
int printed = 0, op = arg->val;
2426

@@ -45,5 +47,3 @@ static size_t syscall_arg__scnprintf_flock(char *bf, size_t size,
4547

4648
return printed;
4749
}
48-
49-
#define SCA_FLOCK syscall_arg__scnprintf_flock

0 commit comments

Comments
 (0)