0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _UAPI_LINUX_USER_EVENTS_H
0009 #define _UAPI_LINUX_USER_EVENTS_H
0010
0011 #include <linux/types.h>
0012 #include <linux/ioctl.h>
0013
0014 #ifdef __KERNEL__
0015 #include <linux/uio.h>
0016 #else
0017 #include <sys/uio.h>
0018 #endif
0019
0020 #define USER_EVENTS_SYSTEM "user_events"
0021 #define USER_EVENTS_PREFIX "u:"
0022
0023
0024 #define EVENT_BIT_FTRACE 0
0025 #define EVENT_BIT_PERF 1
0026 #define EVENT_BIT_OTHER 7
0027
0028 #define EVENT_STATUS_FTRACE (1 << EVENT_BIT_FTRACE)
0029 #define EVENT_STATUS_PERF (1 << EVENT_BIT_PERF)
0030 #define EVENT_STATUS_OTHER (1 << EVENT_BIT_OTHER)
0031
0032
0033 #define DYN_LOC(offset, size) ((size) << 16 | (offset))
0034
0035
0036
0037
0038
0039
0040 struct user_reg {
0041
0042
0043 __u32 size;
0044
0045
0046 __u64 name_args;
0047
0048
0049 __u32 status_index;
0050
0051
0052 __u32 write_index;
0053 };
0054
0055 #define DIAG_IOC_MAGIC '*'
0056
0057
0058 #define DIAG_IOCSREG _IOWR(DIAG_IOC_MAGIC, 0, struct user_reg*)
0059
0060
0061 #define DIAG_IOCSDEL _IOW(DIAG_IOC_MAGIC, 1, char*)
0062
0063 #endif