Function report |
Source Code:kernel\trace\trace_events_hist.c |
Create Date:2022-07-28 12:30:54 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:parse_expr
Proto:static struct hist_field *parse_expr(struct hist_trigger_data *hist_data, struct trace_event_file *file, char *str, unsigned long flags, char *var_name, unsigned int level)
Type:struct hist_field
Parameter:
Type | Parameter | Name |
---|---|---|
struct hist_trigger_data * | hist_data | |
struct trace_event_file * | file | |
char * | str | |
unsigned long | flags | |
char * | var_name | |
unsigned int | level |
3058 | If level > 3 Then |
3063 | field_op = contains_operator(str) |
3065 | If field_op == FIELD_OP_NONE Then Return parse_atom(hist_data, file, str, & flags, var_name) |
3068 | If field_op == FIELD_OP_UNARY_MINUS Then Return parse_unary(hist_data, file, str, flags, var_name, ++level) |
3072 | Case field_op == FIELD_OP_MINUS |
3073 | sep = "-" |
3074 | Break |
3075 | Case field_op == FIELD_OP_PLUS |
3076 | sep = "+" |
3077 | Break |
3078 | Default |
3079 | Go to free |
3083 | If Not operand1_str || Not str Then Go to free |
3086 | operand_flags = 0 |
3087 | operand1 = parse_atom(hist_data, file, operand1_str, & operand_flags, NULL) |
3096 | operand_flags = 0 |
3097 | operand2 = parse_expr(hist_data, file, str, operand_flags, NULL, ++level) |
3104 | ret = check_expr_operands(tr, operand1, operand2) |
3108 | flags |= HIST_FIELD_FL_EXPR |
3110 | flags |= flags & (HIST_FIELD_FL_TIMESTAMP | HIST_FIELD_FL_TIMESTAMP_USECS) |
3114 | If Not expr Then |
3119 | read_once = true |
3120 | read_once = true |
3125 | * The name field is used for EXPR and VAR_REF fields. VAR * fields contain the variable name in var.name. = expr_str(expr, 0) |
3126 | type = kstrdup(type, GFP_KERNEL) |
3127 | If Not type Then |
3129 | Go to free |
3133 | Case field_op == FIELD_OP_MINUS |
3134 | fn = hist_field_minus |
3135 | Break |
3136 | Case field_op == FIELD_OP_PLUS |
3137 | fn = hist_field_plus |
3138 | Break |
3139 | Default |
3144 | Return expr |
3145 | free : |
3146 | destroy_hist_field(operand1, 0) |
3147 | destroy_hist_field(operand2, 0) |
3148 | destroy_hist_field(expr, 0) |
Name | Describe |
---|---|
parse_unary | |
parse_expr | |
__create_val_field | |
create_key_field |
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 |