Function report |
Source Code:kernel\trace\trace.c |
Create Date:2022-07-28 12:04:11 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:tracer_alloc_buffers
Proto:__init static int tracer_alloc_buffers(void)
Type:int
Parameter:Nothing
9256 | If security_locked_down(LOCKDOWN_TRACEFS) Then |
9265 | BUILD_BUG_ON - break compile if a condition is true( Make sure we don't go more than we have bits for > TRACE_FLAGS_MAX_SIZE) |
9267 | If Not alloc_cpumask_var( & tracing_buffer_mask, GFP_KERNEL) Then Go to out |
9270 | If Not alloc_cpumask_var( & only trace on set CPUs , GFP_KERNEL) Then Go to out_free_buffer_mask |
9274 | If __stop___trace_bprintk_fmt != __start___trace_bprintk_fmt Then trace_printk_init_buffers() |
9279 | If On boot up, the ring buffer is set to the minimum size, so that* we do not waste memory on systems that are not using tracing. Then ring_buf_size = trace_buf_size |
9281 | Else ring_buf_size = 1 |
9287 | raw_spin_lock_init( & start_lock) |
9295 | ret = puhp_setup_state_multi - Add callbacks for multi state*@state: The state for which the calls are installed*@name: Name of the callback |
9298 | If ret < 0 Then Go to out_free_cpumask |
9303 | If Not temp_buffer Then Go to out_rm_hp_state |
9306 | If trace_create_savedcmd() < 0 Then Go to out_free_temp_buffer |
9312 | WARN_ON(1) |
9313 | Go to out_free_savedcmd |
9319 | If trace_boot_clock Then |
9320 | ret = tracing_set_clock( & The global_trace is the descriptor that holds the top-level tracing* buffers for the live tracing., trace_boot_clock) |
9321 | If ret < 0 Then pr_warn("Trace clock %s not defined, going back to default\n", trace_boot_clock) |
9331 | current_trace = nop_trace |
9335 | ftrace_init_global_array_ops( & The global_trace is the descriptor that holds the top-level tracing* buffers for the live tracing.) |
9337 | init_trace_flags_index( & The global_trace is the descriptor that holds the top-level tracing* buffers for the live tracing.) |
9342 | init_function_trace() |
9350 | register_die_notifier( & trace_die_notifier) |
9352 | flags = TRACE_ARRAY_FL_GLOBAL |
9360 | apply_trace_boot_options() |
9362 | register_snapshot_cmd() |
9364 | Return 0 |
9366 | out_free_savedcmd : |
9368 | out_free_temp_buffer : |
9370 | out_rm_hp_state : |
9372 | out_free_cpumask : |
9374 | out_free_buffer_mask : |
9376 | out : |
9377 | Return ret |
Name | Describe |
---|---|
early_trace_init |
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 |