Skip to content

Commit

Permalink
perf trace beauty flock: Move to separate object file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 25, 2018
1 parent bafae98 commit c19d084
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,

#include "trace/beauty/arch_errno_names.c"
#include "trace/beauty/eventfd.c"
#include "trace/beauty/flock.c"
#include "trace/beauty/futex_op.c"
#include "trace/beauty/futex_val3.c"
#include "trace/beauty/mmap.c"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/trace/beauty/Build
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
libperf-y += clone.o
libperf-y += fcntl.o
libperf-y += flock.o
ifeq ($(SRCARCH),$(filter $(SRCARCH),x86))
libperf-y += ioctl.o
endif
Expand Down
3 changes: 3 additions & 0 deletions tools/perf/trace/beauty/beauty.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_ar
size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg);
#define SCA_FCNTL_ARG syscall_arg__scnprintf_fcntl_arg

size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg);
#define SCA_FLOCK syscall_arg__scnprintf_flock

size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg);
#define SCA_IOCTL_CMD syscall_arg__scnprintf_ioctl_cmd

Expand Down
10 changes: 5 additions & 5 deletions tools/perf/trace/beauty/flock.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
#include <fcntl.h>

#include "trace/beauty/beauty.h"
#include <linux/kernel.h>
#include <uapi/linux/fcntl.h>

#ifndef LOCK_MAND
#define LOCK_MAND 32
Expand All @@ -17,8 +20,7 @@
#define LOCK_RW 192
#endif

static size_t syscall_arg__scnprintf_flock(char *bf, size_t size,
struct syscall_arg *arg)
size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg)
{
int printed = 0, op = arg->val;

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

return printed;
}

#define SCA_FLOCK syscall_arg__scnprintf_flock

0 comments on commit c19d084

Please sign in to comment.