Function report |
Source Code:kernel\trace\trace.c |
Create Date:2022-07-28 12:00:23 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__tracing_open
Proto:static struct trace_iterator *__tracing_open(struct inode *inode, struct file *file, bool snapshot)
Type:struct trace_iterator
Parameter:
Type | Parameter | Name |
---|---|---|
struct inode * | inode | |
struct file * | file | |
bool | snapshot |
4162 | tr = s or device private pointer |
4169 | iter = __seq_open_private(file, & tracer_seq_ops, size of iter ) |
4173 | buffer_iter = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
4175 | If Not buffer_iter Then Go to release |
4183 | trace = 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). |
4187 | trace = current_trace |
4189 | If Not zalloc_cpumask_var( & started, GFP_KERNEL) Then Go to fail |
4200 | trace_buffer = trace_buffer |
4202 | pos = -1 |
4203 | cpu_file = Should be used after trace_array_get(), trace_types_lock* ensures that i_cdev was already initialized. |
4204 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & mutex) |
4215 | If is this clock in nanoseconds? Then iter_flags |= TRACE_FILE_TIME_IN_NS |
4219 | If Not it's true when current open file is snapshot Then tracing_stop_tr(tr) |
4222 | If cpu_file == RING_BUFFER_ALL_CPUS Then |
4233 | Else |
4240 | tracing_iter_reset(iter, cpu) |
4245 | Return iter |
4247 | fail : |
4250 | kfree(buffer_iter) |
4251 | release : |
4252 | seq_release_private(inode, file) |
Name | Describe |
---|---|
tracing_open |
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 |