Function report |
Source Code:kernel\trace\trace_events_hist.c |
Create Date:2022-07-28 12:30:35 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:parse_field
Proto:static struct ftrace_event_field *parse_field(struct hist_trigger_data *hist_data, struct trace_event_file *file, char *field_str, unsigned long *flags)
Type:struct ftrace_event_field
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct hist_trigger_data * | hist_data | |
| struct trace_event_file * | file | |
| char * | field_str | |
| unsigned long * | flags |
| 2801 | struct ftrace_event_field * field = NULL |
| 2805 | modifier = str = kstrdup(field_str, GFP_KERNEL) |
| 2810 | If modifier Then |
| 2811 | If strcmp(modifier, "hex") == 0 Then flags |= HIST_FIELD_FL_HEX |
| 2813 | Else if strcmp(modifier, "sym") == 0 Then flags |= HIST_FIELD_FL_SYM |
| 2815 | Else if strcmp(modifier, "sym-offset") == 0 Then flags |= HIST_FIELD_FL_SYM_OFFSET |
| 2817 | Else if strcmp(modifier, "execname") == 0 && strcmp(field_name, "common_pid") == 0 Then flags |= HIST_FIELD_FL_EXECNAME |
| 2820 | Else if strcmp(modifier, "syscall") == 0 Then flags |= HIST_FIELD_FL_SYSCALL |
| 2822 | Else if strcmp(modifier, "log2") == 0 Then flags |= HIST_FIELD_FL_LOG2 |
| 2824 | Else if strcmp(modifier, "usecs") == 0 Then flags |= HIST_FIELD_FL_TIMESTAMP_USECS |
| 2826 | Else |
| 2833 | If strcmp(field_name, "common_timestamp") == 0 Then |
| 2834 | flags |= HIST_FIELD_FL_TIMESTAMP |
| 2835 | enable_timestamps = true |
| 2836 | If flags & HIST_FIELD_FL_TIMESTAMP_USECS Then ts_in_usecs = true |
| 2838 | Else if strcmp(field_name, "cpu") == 0 Then flags |= HIST_FIELD_FL_CPU |
| 2840 | Else |
| 2841 | field = trace_find_event_field(event_call, field_name) |
| 2843 | hist_err(tr, HIST_ERR_FIELD_NOT_FOUND, errpos(field_name)) |
| 2845 | Go to out |
| 2848 | out : |
| 2851 | Return field |
| Name | Describe |
|---|---|
| parse_atom | |
| parse_entry | Caller is responsible to free the *pentry. |
| 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 |