aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-07-14 14:21:40 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-07-18 22:14:02 -0400
commitfc65eb8213a437b43e9de7776699aaa25dfa00df (patch)
tree66c9184b3f426b42027ab5c8465b8742d2b86f6f /tools/perf/builtin-trace.c
parent7ee5743404e3641f3c11792761632a5a7d583587 (diff)
perf trace beauty: Export the fd beautifier for use in more places
Now that the beautifiers are being split into multiple source and object files, we will need more of them exported, do it for the 'fd' one, will be used to augment the return of some syscalls that may return an 'fd', such as fcntl(fd, F_DUPFD). 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: http://lkml.kernel.org/n/tip-39sosu12hhywyunqf5s74ewf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index cfa8bf1cca43..65fa0126e939 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -365,11 +365,6 @@ static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
365#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray 365#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
366#endif /* defined(__i386__) || defined(__x86_64__) */ 366#endif /* defined(__i386__) || defined(__x86_64__) */
367 367
368static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
369 struct syscall_arg *arg);
370
371#define SCA_FD syscall_arg__scnprintf_fd
372
373#ifndef AT_FDCWD 368#ifndef AT_FDCWD
374#define AT_FDCWD -100 369#define AT_FDCWD -100
375#endif 370#endif
@@ -1057,8 +1052,7 @@ static const char *thread__fd_path(struct thread *thread, int fd,
1057 return ttrace->paths.table[fd]; 1052 return ttrace->paths.table[fd];
1058} 1053}
1059 1054
1060static size_t syscall_arg__scnprintf_fd(char *bf, size_t size, 1055size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg)
1061 struct syscall_arg *arg)
1062{ 1056{
1063 int fd = arg->val; 1057 int fd = arg->val;
1064 size_t printed = scnprintf(bf, size, "%d", fd); 1058 size_t printed = scnprintf(bf, size, "%d", fd);