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>
This commit is contained in:
Родитель
7ee5743404
Коммит
fc65eb8213
|
@ -365,11 +365,6 @@ static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
|
||||||
#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
|
#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
|
||||||
#endif /* defined(__i386__) || defined(__x86_64__) */
|
#endif /* defined(__i386__) || defined(__x86_64__) */
|
||||||
|
|
||||||
static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
|
|
||||||
struct syscall_arg *arg);
|
|
||||||
|
|
||||||
#define SCA_FD syscall_arg__scnprintf_fd
|
|
||||||
|
|
||||||
#ifndef AT_FDCWD
|
#ifndef AT_FDCWD
|
||||||
#define AT_FDCWD -100
|
#define AT_FDCWD -100
|
||||||
#endif
|
#endif
|
||||||
|
@ -1057,8 +1052,7 @@ static const char *thread__fd_path(struct thread *thread, int fd,
|
||||||
return ttrace->paths.table[fd];
|
return ttrace->paths.table[fd];
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
|
size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg)
|
||||||
struct syscall_arg *arg)
|
|
||||||
{
|
{
|
||||||
int fd = arg->val;
|
int fd = arg->val;
|
||||||
size_t printed = scnprintf(bf, size, "%d", fd);
|
size_t printed = scnprintf(bf, size, "%d", fd);
|
||||||
|
|
|
@ -31,6 +31,9 @@ unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx);
|
||||||
size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size, struct syscall_arg *arg);
|
size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size, struct syscall_arg *arg);
|
||||||
#define SCA_STRARRAYS syscall_arg__scnprintf_strarrays
|
#define SCA_STRARRAYS syscall_arg__scnprintf_strarrays
|
||||||
|
|
||||||
|
size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg);
|
||||||
|
#define SCA_FD syscall_arg__scnprintf_fd
|
||||||
|
|
||||||
size_t syscall_arg__scnprintf_hex(char *bf, size_t size, struct syscall_arg *arg);
|
size_t syscall_arg__scnprintf_hex(char *bf, size_t size, struct syscall_arg *arg);
|
||||||
#define SCA_HEX syscall_arg__scnprintf_hex
|
#define SCA_HEX syscall_arg__scnprintf_hex
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче