3 * modules/parser/msg_parser.h
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 * Copyright (C) Samsung Electronics, 2013
21 * 2013 Vyacheslav Cherkashin, Vitaliy Cherepanov: SWAP Parser implement
29 #include <linux/types.h>
34 AT_TIZEN_NATIVE_APP = 0x01,
36 AT_COMMON_EXEC = 0x03,
37 AT_TIZEN_WEB_APP = 0x04
44 /* Basic application information */
45 struct app_info_data {
46 enum APP_TYPE app_type;
51 /* Configuration struct */
59 /* Application and library functions to set probes */
60 struct func_inst_data {
67 struct lib_inst_data {
70 struct func_inst_data **func;
73 /* Application struct */
74 struct app_inst_data {
75 struct app_info_data *app_info;
77 struct func_inst_data **func;
79 struct lib_inst_data **lib;
82 /* User space instrumentation struct */
85 struct app_inst_data **app_inst;
89 struct app_info_data *create_app_info(struct msg_buf *mb);
90 void destroy_app_info(struct app_info_data *app_info);
92 struct conf_data *create_conf_data(struct msg_buf *mb);
93 void destroy_conf_data(struct conf_data *conf);
95 void save_config(const struct conf_data *conf);
96 void restore_config(struct conf_data *conf);
98 struct func_inst_data *create_func_inst_data(struct msg_buf *mb);
99 void destroy_func_inst_data(struct func_inst_data *func_inst);
101 struct lib_inst_data *create_lib_inst_data(struct msg_buf *mb);
102 void destroy_lib_inst_data(struct lib_inst_data *lib_inst);
104 struct app_inst_data *create_app_inst_data(struct msg_buf *mb);
105 void destroy_app_inst_data(struct app_inst_data *app_inst);
107 struct us_inst_data *create_us_inst_data(struct msg_buf *mb);
108 void destroy_us_inst_data(struct us_inst_data *us_inst);
111 /* empty functions for calculating size fields in structures */
112 struct func_inst_data make_func_inst_data(void);
113 struct lib_inst_data make_lib_inst_data(void);
114 struct app_inst_data make_app_inst_data(void);
115 struct us_inst_data make_us_inst_data(void);
119 MIN_SIZE_FUNC_INST = sizeof(make_func_inst_data().addr) +
121 MIN_SIZE_LIB_INST = MIN_SIZE_STRING +
122 sizeof(make_lib_inst_data().cnt_func),
123 MIN_SIZE_APP_INFO = SIZE_APP_TYPE + MIN_SIZE_STRING + MIN_SIZE_STRING,
124 MIN_SIZE_APP_INST = MIN_SIZE_APP_INFO +
125 sizeof(make_app_inst_data().cnt_func) +
126 sizeof(make_app_inst_data().cnt_lib),
127 MIN_SIZE_US_INST = sizeof(make_us_inst_data().cnt)
130 #endif /* _MSG_PARSER_H */