1 ////////////////////////////////////////////////////////////////////////////////////
8 // AUTHOR: L.Komkov, S.Dianov, A.Gerenkov
9 // COMPANY NAME: Samsung Research Center in Moscow
10 // DEPT NAME: Advanced Software Group
11 // CREATED: 2008.02.15
13 // REVISION DATE: 2008.12.02
15 ////////////////////////////////////////////////////////////////////////////////////
17 #if !defined(ec_ioctl_h)
20 #include "ec_info.h" // ec_info_t
29 // buffer manipulation
30 EC_IOCTL_SET_BUFFER_SIZE,
31 EC_IOCTL_GET_BUFFER_SIZE,
32 EC_IOCTL_RESET_BUFFER,
35 EC_IOCTL_SELECT_PROBE,
36 EC_IOCTL_DESELECT_PROBE,
37 EC_IOCTL_GET_PROBE_INFO,
40 EC_IOCTL_SET_PROFILEBUNDLE,
41 //EC_IOCTL_REMOVE_PROBE,
42 EC_IOCTL_RESET_PROBES,
43 EC_IOCTL_SET_COMPLEX_PROBES,
46 EC_IOCTL_ATTACH, // attaches selected probes
47 EC_IOCTL_ACTIVATE, // START
49 // stop is common for both tracing and profiling
50 EC_IOCTL_STOP_AND_DETACH, // STOP (and detach for TRACING)
52 // kernel to user notification delivery
53 EC_IOCTL_WAIT_NOTIFICATION,
57 EC_IOCTL_GET_COMPLEX_STATUS,
58 EC_IOCTL_CONSUME_BUFFER,
60 // instrument user space process
61 EC_IOCTL_INST_USR_SPACE_PROC,
62 // deinstrument user space process
63 EC_IOCTL_DEINST_USR_SPACE_PROC,
66 EC_IOCTL_UPDATE_CONDS,
72 EC_IOCTL_SET_EVENT_MASK,
73 EC_IOCTL_GET_EVENT_MASK,
75 // pre-defined user space probes
76 EC_IOCTL_SET_PREDEF_UPROBES,
77 EC_IOCTL_GET_PREDEF_UPROBES,
78 EC_IOCTL_GET_PREDEF_UPROBES_SIZE,
84 unsigned notification_count;
86 } ioctl_wait_notification_t;
91 unsigned int m_unsignedInt;
93 unsigned long m_unsignedLong;
99 OPERATION_ANY, // means do not check value
108 unsigned m_condition_always_false;
112 unsigned m_op_probe_id;
113 // char m_probe_name[SWAP_COMMON_STRING_SIZE];
114 unsigned m_op_record_type;
116 unsigned m_time_usec;
120 unsigned m_record_type;
125 // condition matching any event
126 #define CONDITION_ANY \
128 .m_condition_always_false = 0, \
129 .m_op_time = OPERATION_ANY, \
130 .m_op_pid = OPERATION_ANY, \
131 .m_op_tid = OPERATION_ANY, \
132 .m_op_probe_id = OPERATION_ANY, \
133 .m_op_record_type = OPERATION_ANY, \
136 // never matching condition
137 #define CONDITION_FALSE \
139 .m_condition_always_false = 1, \
140 .m_op_time = OPERATION_ANY, \
141 .m_op_pid = OPERATION_ANY, \
142 .m_op_tid = OPERATION_ANY, \
143 .m_op_probe_id = OPERATION_ANY, \
144 .m_op_record_type = OPERATION_ANY, \
147 // default start condition - start immediately
148 #define DEFAULT_START_CONDITION CONDITION_ANY
149 // default stop condition - never stop
150 #define DEFAULT_STOP_CONDITION CONDITION_FALSE
157 } ioctl_set_pids_to_ignore_t;
166 signed char reg; // -1 - memory, 0..127 - register number
168 } ioctl_usr_space_vtp_t;
175 } ioctl_usr_space_ip_t;
182 ioctl_usr_space_ip_t *p_ips;
184 ioctl_usr_space_vtp_t *p_vtps;
185 } ioctl_usr_space_lib_t;
192 ioctl_usr_space_lib_t *p_libs;
193 } ioctl_inst_usr_space_proc_t;
199 } ioctl_set_proc_to_ignore_t;
207 // exclude entry events
208 #define IOCTL_EMASK_ENTRY 0x01
209 // exclude exit events
210 #define IOCTL_EMASK_EXIT 0x02
212 #define IOCTL_EMASK_TIME 0x04
214 #define IOCTL_EMASK_PID 0x08
216 #define IOCTL_EMASK_TID 0x10
218 #define IOCTL_EMASK_CPU 0x20
220 #define IOCTL_EMASK_ARGS 0x40
224 unsigned probes_count;
226 } ioctl_predef_uprobes_info_t;
229 #endif /* !defined(ec_ioctl_h) */