函数逻辑报告 | 
Source Code:kernel\trace\trace_uprobe.c | 
Create Date:2022-07-27 13:55:53 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:trace_uprobe_create
函数原型:static int trace_uprobe_create(int argc, const char **argv)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| int | argc | |
| const char ** | argv | 
| 536 | event等于NULL, group等于UPROBE_EVENT_SYSTEM | 
| 541 | bool is_return = false | 
| 544 | ret等于0 | 
| 545 | ref_ctr_offset等于0 | 
| 552 | 退出 | 
| 553 | 默认 | 
| 554 | 返回:负ECANCELED | 
| 563 | 如果非strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for则返回:负ECANCELED | 
| 566 | filename等于kstrdup(argv[1], GFP_KERNEL) | 
| 571 | arg等于strrchr - Find the last occurrence of a character in a string*@s: The string to be searched*@c: The character to search for | 
| 577 | trace_probe_log_init("trace_uprobe", argc, argv) | 
| 578 | trace_probe_log_set_index(1) | 
| 580 | arg自加等于'\0' | 
| 581 | ret等于kern_path(filename, llow links at the end , & path) | 
| 582 | 如果ret则 | 
| 595 | rctr等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for | 
| 596 | 如果rctr则 | 
| 597 | rctr_end等于strchr - Find the first occurrence of the character c in the string s.*@s: the string to be searched*@c: the character to search for | 
| 598 | 如果非rctr_end则 | 
| 603 | 转到:fail_address_parse | 
| 604 | 否则如果rctr_end[1]不等于'\0'则 | 
| 606 | trace_probe_log_err(rctr_end + 1 - filename, BAD_REFCNT_SUFFIX) | 
| 608 | 转到:fail_address_parse | 
| 611 | rctr自加等于'\0' | 
| 612 | rctr_end等于'\0' | 
| 614 | 如果ret则 | 
| 615 | trace_probe_log_err(rctr - filename, BAD_REFCNT) | 
| 616 | 转到:fail_address_parse | 
| 622 | 如果ret则 | 
| 624 | 转到:fail_address_parse | 
| 628 | trace_probe_log_set_index(0) | 
| 629 | 如果event则 | 
| 632 | 如果ret则转到:fail_address_parse | 
| 634 | 否则 | 
| 638 | tail等于kstrdup(返回路径的最后一部分, GFP_KERNEL) | 
| 639 | 如果非tail则 | 
| 641 | 转到:fail_address_parse | 
| 653 | argc减等于2 | 
| 654 | argv加等于2 | 
| 657 | 如果是错误则 | 
| 669 | 以i小于argc且i小于MAX_TRACE_ARGS循环 | 
| 670 | tmp等于kstrdup(argv[i], GFP_KERNEL) | 
| 671 | 如果非tmp则 | 
| 676 | trace_probe_log_set_index(i + 2) | 
| 677 | ret等于traceprobe_parse_probe_arg( & tp, i, tmp, is_return ? TPARG_FL_RETURN : 0) | 
| 684 | ret等于traceprobe_set_print_fmt( & tp, is_ret_probe(tu)) | 
| 692 | error : | 
| 693 | free_trace_uprobe(tu) | 
| 694 | out : | 
| 695 | trace_probe_log_clear() | 
| 696 | 返回:ret | 
| 698 | fail_address_parse : | 
| 699 | trace_probe_log_clear() | 
| 703 | 返回:ret | 
| 名称 | 描述 | 
|---|---|
| create_or_delete_trace_uprobe | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |