Go to the documentation of this file.
26 #include <linux/slab.h>
29 #include <linux/types.h>
30 #include <linux/string.h>
31 #include <linux/ctype.h>
32 #include <linux/ptrace.h>
33 #include <linux/perf_event.h>
38 #include <asm/bitsperlong.h>
43 #define MAX_TRACE_ARGS 128
44 #define MAX_ARGSTR_LEN 63
45 #define MAX_EVENT_NAME_LEN 64
46 #define MAX_STRING_SIZE PATH_MAX
49 #define FIELD_STRING_IP "__probe_ip"
50 #define FIELD_STRING_RETIP "__probe_ret_ip"
51 #define FIELD_STRING_FUNC "__probe_func"
54 #define DEFINE_FIELD(type, item, name, is_signed) \
56 ret = trace_define_field(event_call, #type, name, \
57 offsetof(typeof(field), item), \
58 sizeof(field.item), is_signed, \
66 #define TP_FLAG_TRACE 1
67 #define TP_FLAG_PROFILE 2
68 #define TP_FLAG_REGISTERED 4
69 #define TP_FLAG_UPROBE 8
73 #define make_data_rloc(len, roffs) \
74 (((u32)(len) << 16) | ((u32)(roffs) & 0xffff))
75 #define get_rloc_len(dl) ((u32)(dl) >> 16)
76 #define get_rloc_offs(dl) ((u32)(dl) & 0xffff)
83 #define convert_rloc_to_loc(dl, offs) ((u32)(dl) + (offs))
131 return fprm->
fn(regs, fprm->
data, dest);
135 static inline int is_good_name(
const char *
name)
137 if (!
isalpha(*name) && *name !=
'_')
139 while (*++name !=
'\0') {
147 struct probe_arg *parg,
bool is_return,
bool is_kprobe);
158 const char __user *
buffer,
size_t count, loff_t *ppos,
159 int (*createfn)(
int,
char**));