Function report |
Source Code:kernel\trace\trace_uprobe.c |
Create Date:2022-07-28 12:44:23 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:trace_uprobe_create
Proto:static int trace_uprobe_create(int argc, const char **argv)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 |
548 | Case argv[0][0] == 'r' |
549 | is_return = true |
550 | Break |
551 | Case argv[0][0] == 'p' |
552 | Break |
553 | Default |
554 | Return -ECANCELED |
563 | If Not 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 Then Return -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 | If ret Then |
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 | If rctr Then |
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 | If Not rctr_end Then |
603 | Go to fail_address_parse |
604 | Else if rctr_end[1] != '\0' Then |
606 | trace_probe_log_err(rctr_end + 1 - filename, BAD_REFCNT_SUFFIX) |
608 | Go to fail_address_parse |
611 | rctr++ = '\0' |
612 | rctr_end = '\0' |
614 | If ret Then |
615 | trace_probe_log_err(rctr - filename, BAD_REFCNT) |
616 | Go to fail_address_parse |
622 | If ret Then |
624 | Go to fail_address_parse |
628 | trace_probe_log_set_index(0) |
629 | If event Then |
632 | If ret Then Go to fail_address_parse |
634 | Else |
638 | tail = kstrdup(kbasename - return the last part of a pathname.*@path: path to extract the filename from., GFP_KERNEL) |
639 | If Not tail Then |
641 | Go to fail_address_parse |
653 | argc -= 2 |
654 | argv += 2 |
664 | ref_ctr_offset = ref_ctr_offset |
669 | When i < argc && i < MAX_TRACE_ARGS cycle |
670 | tmp = kstrdup(argv[i], GFP_KERNEL) |
671 | If Not tmp Then |
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 | Return ret |
698 | fail_address_parse : |
699 | trace_probe_log_clear() |
703 | Return ret |
Name | Describe |
---|---|
create_or_delete_trace_uprobe |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |