| Function report | 
| Source Code: kernel\trace\trace.c | Create Date:2022-07-28 12:03:32 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:trace_array_create
Proto:static struct trace_array *trace_array_create(const char *name)
Type:struct trace_array
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const char * | name | 
| 8474 | tr = 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). | 
| 8478 | name = kstrdup(name, GFP_KERNEL) | 
| 8479 | If Not name Then Go to out_free_tr | 
| 8482 | If Not alloc_cpumask_var( & only trace on set CPUs , GFP_KERNEL) Then Go to out_free_tr | 
| 8489 | raw_spin_lock_init( & start_lock) | 
| 8493 | current_trace = nop_trace | 
| 8500 | If allocate_trace_buffers(tr, trace_buf_size) < 0 Then Go to out_free_tr | 
| 8503 | dir = tracefs_create_dir(name, trace_instance_dir) | 
| 8504 | If Not dir Then Go to out_free_tr | 
| 8508 | If ret Then | 
| 8509 | tracefs_remove_recursive(dir) | 
| 8510 | Go to out_free_tr | 
| 8513 | ftrace_init_trace_array(tr) | 
| 8515 | init_tracer_tracefs(tr, dir) | 
| 8516 | init_trace_flags_index(tr) | 
| 8517 | __update_tracer_options(tr) | 
| 8521 | ref++ | 
| 8524 | Return tr | 
| 8526 | out_free_tr : | 
| 8527 | free_trace_buffers(tr) | 
| Name | Describe | 
|---|---|
| instance_mkdir | |
| trace_array_get_by_name | race_array_get_by_name - Create/Lookup a trace array, given its name | 
| 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 |