Function report |
Source Code:kernel\trace\trace_events_hist.c |
Create Date:2022-07-28 12:30:18 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:create_hist_field
Proto:static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data, struct ftrace_event_field *field, unsigned long flags, char *var_name)
Type:struct hist_field
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct hist_trigger_data * | hist_data | |
| struct ftrace_event_field * | field | |
| unsigned long | flags | |
| char * | var_name |
| 2473 | If field && is_function_field(field) Then Return NULL |
| 2476 | hist_field = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 2477 | If Not hist_field Then Return NULL |
| 2480 | ref = 1 |
| 2484 | If flags & HIST_FIELD_FL_EXPR || flags & HIST_FIELD_FL_ALIAS Then Go to out |
| 2487 | If flags & HIST_FIELD_FL_VAR_REF Then |
| 2488 | fn = hist_field_var_ref |
| 2489 | Go to out |
| 2492 | If flags & HIST_FIELD_FL_HITCOUNT Then |
| 2501 | If flags & HIST_FIELD_FL_STACKTRACE Then |
| 2502 | fn = hist_field_none |
| 2503 | Go to out |
| 2506 | If flags & HIST_FIELD_FL_LOG2 Then |
| 2507 | fl = flags & ~HIST_FIELD_FL_LOG2 |
| 2508 | fn = hist_field_log2 |
| 2509 | operands[0] = create_hist_field(hist_data, field, fl, NULL) |
| 2511 | type = kstrdup(type, GFP_KERNEL) |
| 2514 | Go to out |
| 2517 | If flags & HIST_FIELD_FL_TIMESTAMP Then |
| 2526 | If flags & HIST_FIELD_FL_CPU Then |
| 2535 | If WARN_ON_ONCE(!field) Then Go to out |
| 2538 | If is_string_field(field) Then |
| 2539 | flags |= HIST_FIELD_FL_STRING |
| 2542 | type = kstrdup(type, GFP_KERNEL) |
| 2546 | If filter_type == FILTER_STATIC_STRING Then fn = hist_field_string |
| 2548 | Else if filter_type == FILTER_DYN_STRING Then fn = hist_field_dynstring |
| 2550 | Else fn = hist_field_pstring |
| 2552 | Else |
| 2555 | type = kstrdup(type, GFP_KERNEL) |
| 2559 | fn = select_value_fn(size, is_signed) |
| 2561 | If Not fn Then |
| 2562 | destroy_hist_field(hist_field, 0) |
| 2563 | Return NULL |
| 2566 | out : |
| 2570 | If var_name Then |
| 2576 | Return hist_field |
| 2577 | free : |
| 2578 | destroy_hist_field(hist_field, 0) |
| 2579 | Return NULL |
| Name | Describe |
|---|---|
| create_hist_field | |
| create_var_ref | reate_var_ref - Create a variable reference and attach it to trigger*@hist_data: The trigger that will be referencing the variable*@var_field: The VAR field to create a reference to*@system: The optional system string*@event_name: The optional event_name |
| create_alias | |
| parse_atom | |
| parse_unary | |
| parse_expr | |
| create_hitcount_val | |
| 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 |