函数逻辑报告 |
Source Code:kernel\trace\trace_events_filter.c |
Create Date:2022-07-27 13:33:25 |
| Last Modify:2022-05-22 20:19:57 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Called when a predicate is encountered by predicate_parse()
函数原型:static int parse_pred(const char *str, void *data, int pos, struct filter_parse_error *pe, struct filter_pred **pred_ptr)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| const char * | str | |
| void * | data | |
| int | pos | |
| struct filter_parse_error * | pe | |
| struct filter_pred ** | pred_ptr |
| 1158 | struct filter_pred * pred = NULL |
| 1167 | i等于0 |
| 1171 | i自加 |
| 1175 | i自加 |
| 1179 | 如果非len则返回:负1 |
| 1182 | field_name等于kmemdup_nul(str + s, len, GFP_KERNEL) |
| 1183 | 如果非field_name则返回:负ENOMEM |
| 1188 | field等于trace_find_event_field(call, field_name) |
| 1189 | kfree(field_name) |
| 1190 | 如果非field则 |
| 1191 | parse_error(pe, FILT_ERR_FIELD_NOT_FOUND, pos + i) |
| 1192 | 返回:负EINVAL |
| 1196 | i自加 |
| 1206 | parse_error(pe, FILT_ERR_INVALID_OP, pos + i) |
| 1207 | 转到:err_free |
| 1213 | i自加 |
| 1225 | 如果ftrace_event_is_function(call)则 |
| 1233 | 如果字符串比较不等于0则 |
| 1234 | parse_error(pe, FILT_ERR_IP_FIELD_ONLY, pos + i) |
| 1235 | 转到:err_free |
| 1237 | fn等于filter_pred_none |
| 1245 | 否则q等于0 |
| 1259 | 如果len大于等于Should handle KSYM_SYMBOL_LEN 则 |
| 1260 | parse_error(pe, FILT_ERR_OPERAND_TOO_LONG, pos + i) |
| 1261 | 转到:err_free |
| 1275 | not等于1 |
| 1279 | 退出 |
| 1280 | 默认 |
| 1281 | parse_error(pe, FILT_ERR_ILLEGAL_FIELD_OP, pos + i) |
| 1282 | 转到:err_free |
| 1286 | 如果非is_string_field(field)则 |
| 1287 | parse_error(pe, FILT_ERR_EXPECT_DIGIT, pos + i) |
| 1288 | 转到:err_free |
| 1296 | parse_error(pe, FILT_ERR_MISSING_QUOTE, pos + i) |
| 1297 | 转到:err_free |
| 1301 | s自加 |
| 1303 | 如果len大于等于Should handle KSYM_SYMBOL_LEN 则 |
| 1304 | parse_error(pe, FILT_ERR_OPERAND_TOO_LONG, pos + i) |
| 1305 | 转到:err_free |
| 1312 | filter_build_regex(pred) |
| 1314 | 如果filter_type恒等于FILTER_COMM则 |
| 1315 | fn等于Filter predicate for COMM. |
| 1317 | 否则如果filter_type恒等于FILTER_STATIC_STRING则 |
| 1321 | 否则如果filter_type恒等于FILTER_DYN_STRING则fn等于Filter predicate for dynamic sized arrays of characters |
| 1326 | i自加 |
| 1331 | 如果is_string_field(field)则 |
| 1332 | parse_error(pe, FILT_ERR_EXPECT_STRING, pos + i) |
| 1333 | 转到:err_free |
| 1337 | parse_error(pe, FILT_ERR_ILLEGAL_FIELD_OP, pos + i) |
| 1338 | 转到:err_free |
| 1346 | i自加 |
| 1351 | parse_error(pe, FILT_ERR_OPERAND_TOO_LONG, pos + i) |
| 1352 | 转到:err_free |
| 1363 | 如果ret则 |
| 1364 | parse_error(pe, FILT_ERR_ILLEGAL_INTVAL, pos + s) |
| 1365 | 转到:err_free |
| 1370 | 如果filter_type恒等于FILTER_CPU则fn等于Filter predicate for CPUs. |
| 1372 | 否则 |
| 1379 | 否则 |
| 1380 | parse_error(pe, FILT_ERR_INVALID_VALUE, pos + i) |
| 1381 | 转到:err_free |
| 1385 | 返回:i |
| 1387 | err_free : |
| 1389 | 返回:负EINVAL |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |