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,
43 /* Basic application information */
44 struct app_info_data {
45 enum APP_TYPE app_type;
50 /* Configuration struct */
58 /* Application and library functions to set probes */
59 struct func_inst_data {
65 struct lib_inst_data {
68 struct func_inst_data **func;
71 /* Application struct */
72 struct app_inst_data {
73 struct app_info_data *app_info;
75 struct func_inst_data **func;
77 struct lib_inst_data **lib;
80 /* User space instrumentation struct */
83 struct app_inst_data **app_inst;
87 struct app_info_data *create_app_info(struct msg_buf *mb);
88 void destroy_app_info(struct app_info_data *app_info);
90 struct conf_data *create_conf_data(struct msg_buf *mb);
91 void destroy_conf_data(struct conf_data *conf);
93 struct func_inst_data *create_func_inst_data(struct msg_buf *mb);
94 void destroy_func_inst_data(struct func_inst_data *func_inst);
96 struct lib_inst_data *create_lib_inst_data(struct msg_buf *mb);
97 void destroy_lib_inst_data(struct lib_inst_data *lib_inst);
99 struct app_inst_data *create_app_inst_data(struct msg_buf *mb);
100 void destroy_app_inst_data(struct app_inst_data *app_inst);
102 struct us_inst_data *create_us_inst_data(struct msg_buf *mb);
103 void destroy_us_inst_data(struct us_inst_data *us_inst);
106 /* empty functions for calculating size fields in structures */
107 struct func_inst_data make_func_inst_data(void);
108 struct lib_inst_data make_lib_inst_data(void);
109 struct app_inst_data make_app_inst_data(void);
110 struct us_inst_data make_us_inst_data(void);
114 MIN_SIZE_FUNC_INST = sizeof(make_func_inst_data().addr) +
116 MIN_SIZE_LIB_INST = MIN_SIZE_STRING +
117 sizeof(make_lib_inst_data().cnt_func),
118 MIN_SIZE_APP_INFO = SIZE_APP_TYPE + MIN_SIZE_STRING + MIN_SIZE_STRING,
119 MIN_SIZE_APP_INST = MIN_SIZE_APP_INFO +
120 sizeof(make_app_inst_data().cnt_func) +
121 sizeof(make_app_inst_data().cnt_lib),
122 MIN_SIZE_US_INST = sizeof(make_us_inst_data().cnt)
125 #endif /* _MSG_PARSER_H */