Linux Perf
beauty.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _PERF_TRACE_BEAUTY_H
3 #define _PERF_TRACE_BEAUTY_H
4 
5 #include <linux/kernel.h>
6 #include <linux/types.h>
7 #include <sys/types.h>
8 
9 struct strarray {
10  int offset;
12  const char **entries;
13 };
14 
15 #define DEFINE_STRARRAY(array) struct strarray strarray__##array = { \
16  .nr_entries = ARRAY_SIZE(array), \
17  .entries = array, \
18 }
19 
20 #define DEFINE_STRARRAY_OFFSET(array, off) struct strarray strarray__##array = { \
21  .offset = off, \
22  .nr_entries = ARRAY_SIZE(array), \
23  .entries = array, \
24 }
25 
26 size_t strarray__scnprintf(struct strarray *sa, char *bf, size_t size, const char *intfmt, int val);
27 
28 struct trace;
29 struct thread;
30 
31 size_t pid__scnprintf_fd(struct trace *trace, pid_t pid, int fd, char *bf, size_t size);
32 
43 struct syscall_arg {
44  unsigned long val;
45  unsigned char *args;
46  struct thread *thread;
47  struct trace *trace;
48  void *parm;
49  u8 idx;
50  u8 mask;
51 };
52 
53 unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx);
54 
55 size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size, struct syscall_arg *arg);
56 #define SCA_STRARRAYS syscall_arg__scnprintf_strarrays
57 
58 size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg);
59 #define SCA_FD syscall_arg__scnprintf_fd
60 
61 size_t syscall_arg__scnprintf_hex(char *bf, size_t size, struct syscall_arg *arg);
62 #define SCA_HEX syscall_arg__scnprintf_hex
63 
64 size_t syscall_arg__scnprintf_int(char *bf, size_t size, struct syscall_arg *arg);
65 #define SCA_INT syscall_arg__scnprintf_int
66 
67 size_t syscall_arg__scnprintf_long(char *bf, size_t size, struct syscall_arg *arg);
68 #define SCA_LONG syscall_arg__scnprintf_long
69 
70 size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg);
71 #define SCA_PID syscall_arg__scnprintf_pid
72 
73 size_t syscall_arg__scnprintf_clone_flags(char *bf, size_t size, struct syscall_arg *arg);
74 #define SCA_CLONE_FLAGS syscall_arg__scnprintf_clone_flags
75 
76 size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_arg *arg);
77 #define SCA_FCNTL_CMD syscall_arg__scnprintf_fcntl_cmd
78 
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
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 
85 size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg);
86 #define SCA_IOCTL_CMD syscall_arg__scnprintf_ioctl_cmd
87 
88 size_t syscall_arg__scnprintf_kcmp_type(char *bf, size_t size, struct syscall_arg *arg);
89 #define SCA_KCMP_TYPE syscall_arg__scnprintf_kcmp_type
90 
91 size_t syscall_arg__scnprintf_kcmp_idx(char *bf, size_t size, struct syscall_arg *arg);
92 #define SCA_KCMP_IDX syscall_arg__scnprintf_kcmp_idx
93 
94 size_t syscall_arg__scnprintf_pkey_alloc_access_rights(char *bf, size_t size, struct syscall_arg *arg);
95 #define SCA_PKEY_ALLOC_ACCESS_RIGHTS syscall_arg__scnprintf_pkey_alloc_access_rights
96 
97 size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size, struct syscall_arg *arg);
98 #define SCA_OPEN_FLAGS syscall_arg__scnprintf_open_flags
99 
100 size_t syscall_arg__scnprintf_prctl_option(char *bf, size_t size, struct syscall_arg *arg);
101 #define SCA_PRCTL_OPTION syscall_arg__scnprintf_prctl_option
102 
103 size_t syscall_arg__scnprintf_prctl_arg2(char *bf, size_t size, struct syscall_arg *arg);
104 #define SCA_PRCTL_ARG2 syscall_arg__scnprintf_prctl_arg2
105 
106 size_t syscall_arg__scnprintf_prctl_arg3(char *bf, size_t size, struct syscall_arg *arg);
107 #define SCA_PRCTL_ARG3 syscall_arg__scnprintf_prctl_arg3
108 
109 size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg);
110 #define SCA_STATX_FLAGS syscall_arg__scnprintf_statx_flags
111 
112 size_t syscall_arg__scnprintf_statx_mask(char *bf, size_t size, struct syscall_arg *arg);
113 #define SCA_STATX_MASK syscall_arg__scnprintf_statx_mask
114 
115 size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size);
116 
118  size_t (*ret_scnprintf)(char *bf, size_t size, struct syscall_arg *arg));
119 
120 const char *arch_syscalls__strerrno(const char *arch, int err);
121 
122 #endif /* _PERF_TRACE_BEAUTY_H */
size_t syscall_arg__scnprintf_prctl_arg3(char *bf, size_t size, struct syscall_arg *arg)
Definition: prctl.c:43
size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg)
Definition: statx.c:15
size_t syscall_arg__scnprintf_statx_mask(char *bf, size_t size, struct syscall_arg *arg)
Definition: statx.c:43
unsigned char * args
Definition: beauty.h:45
void * parm
Definition: beauty.h:48
size_t size
Definition: evsel.c:60
size_t strarray__scnprintf(struct strarray *sa, char *bf, size_t size, const char *intfmt, int val)
size_t syscall_arg__scnprintf_kcmp_type(char *bf, size_t size, struct syscall_arg *arg)
Definition: kcmp.c:36
int int err
Definition: 5sec.c:44
size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg)
Definition: pid.c:2
size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg)
int nr_entries
Definition: beauty.h:11
u8 idx
Definition: beauty.h:49
struct trace * trace
Definition: beauty.h:47
Definition: thread.h:18
const char ** entries
Definition: beauty.h:12
size_t syscall_arg__scnprintf_kcmp_idx(char *bf, size_t size, struct syscall_arg *arg)
Definition: kcmp.c:17
size_t syscall_arg__scnprintf_clone_flags(char *bf, size_t size, struct syscall_arg *arg)
Definition: clone.c:55
u8 mask
Definition: beauty.h:50
size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg)
Definition: flock.c:23
Definition: beauty.h:9
size_t syscall_arg__scnprintf_prctl_option(char *bf, size_t size, struct syscall_arg *arg)
Definition: prctl.c:53
size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg)
Definition: fcntl.c:70
size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
Definition: open_flags.c:25
u32 pid
Definition: hists_common.c:15
size_t pid__scnprintf_fd(struct trace *trace, pid_t pid, int fd, char *bf, size_t size)
const char * arch_syscalls__strerrno(const char *arch, int err)
unsigned long val
Definition: beauty.h:44
u32 flags
Definition: annotate.c:60
size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg)
Definition: ioctl.c:157
size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size, struct syscall_arg *arg)
Definition: open_flags.c:77
struct thread * thread
Definition: beauty.h:46
int offset
Definition: beauty.h:10
size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_arg *arg)
Definition: fcntl.c:36
size_t syscall_arg__scnprintf_prctl_arg2(char *bf, size_t size, struct syscall_arg *arg)
Definition: prctl.c:27
size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size, struct syscall_arg *arg)
size_t syscall_arg__scnprintf_int(char *bf, size_t size, struct syscall_arg *arg)
size_t syscall_arg__scnprintf_pkey_alloc_access_rights(char *bf, size_t size, struct syscall_arg *arg)
Definition: pkey_alloc.c:45
size_t syscall_arg__scnprintf_hex(char *bf, size_t size, struct syscall_arg *arg)
size_t syscall_arg__scnprintf_long(char *bf, size_t size, struct syscall_arg *arg)
unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx)
void syscall_arg__set_ret_scnprintf(struct syscall_arg *arg, size_t(*ret_scnprintf)(char *bf, size_t size, struct syscall_arg *arg))