1197b9731529a1e66aaa77ddd0ff65e828a199aa
[kernel/swap-modules.git] / parser / protocol_description.h
1 /* Current protocol versions description */
2
3 #include <linux/types.h>
4
5 #ifndef __PROTOCOL_DESCRIPTION_H__
6 #define __PROTOCOL_DESCRIPTION_H__
7
8 enum features {
9     CPU                 = 0x1,      /* CPU core load, frequency, process load */
10     memory              = 0x2,      /* Process size, heap usage, physical memory */
11     func_profiling      = 0x4,      /* On/Off the UserSpaceInst */
12     mem_allocation      = 0x8,      /* Memory allocation API */
13     file_api            = 0x10,     /* File API */
14     thread_api          = 0x20,     /* Thread API */
15     osp_ui_api          = 0x40,     /* UI API */
16     screenshot          = 0x80,     /* Screenshot */
17     user_event          = 0x100,    /* Touch, Gesture, Orientation, Key */
18     recording           = 0x200,    /* Recording user events */
19     syscall_file        = 0x400,    /* File operation syscalls tracing */
20     syscall_ipc         = 0x800,    /* IPC syscall tracing */
21     syscall_process     = 0x1000,   /* Process syscalls tracing */
22     syscall_signal      = 0x2000,   /* Signal syscalls tracing */
23     syscall_network     = 0x4000,   /* Network syscalls tracing */
24     syscall_desc        = 0x8000,   /* Descriptor syscalls tracing */
25     context_switch      = 0x10000,  /* Context switch tracing */
26     network_api         = 0x20000,  /* Network API */
27     opengl_api          = 0x40000,  /* OpenGL API */
28     function_sampling   = 0x80000   /* Function sampling */
29 };
30
31 /* Basic application information */
32 struct application_information_t {
33     u_int32_t t_app_type;
34     char *t_app_id;
35     char *exec_path;
36 };
37
38 /* Configuration struct */
39 struct configuration_t {
40     u_int64_t use_features;
41     u_int32_t sys_trace_period;
42     u_int32_t data_msg_period;
43 };
44
45 /* User space instrumentation struct */
46 struct user_space_inst_t {
47     u_int32_t app_count;
48     struct application_inst_t *a_inst;
49 };
50
51 /* Application struct */
52 struct application_inst_t {
53     char *app_path;
54     u_int32_t func_count;
55     struct function_inst_t *f_inst;
56     u_int32_t lib_count;
57     struct library_inst_t *l_inst;
58 };
59
60 /* Application and library functions to set probes */
61 struct function_inst_t {
62     u_int64_t func_address;
63     u_int32_t args_count;
64     char *args;
65 };
66
67 /* Library struct */
68 struct library_inst_t {
69     char *lib_path;
70     u_int32_t func_count;
71     struct function_inst_t *f_inst;
72 };
73
74
75 #endif /* __PROTOCOL_DESCRIPTION_H__ */