Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace.c Create Date:2022-07-28 12:00:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:set_tracer_flag

Proto:int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled)

Type:int

Parameter:

TypeParameterName
struct trace_array *tr
unsigned intmask
intenabled
4690  If mask == TRACE_ITER_RECORD_TGID || mask == TRACE_ITER_RECORD_CMD Then lockdep_assert_held( & event_mutex)
4695  If Not Not (trace_flags & mask) == Not Not enabled Then Return 0
4699  If flag_changed Then If flag_changed(tr, mask, !!enabled) Then
4701  Return -EINVAL
4703  If enabled Then trace_flags |= mask
4705  Else trace_flags &= ~mask
4708  If mask == TRACE_ITER_RECORD_CMD Then trace_event_enable_cmd_record(enabled)
4711  If mask == TRACE_ITER_RECORD_TGID Then
4712  If Not tgid_map Then tgid_map = kvcalloc(This controls the default maximum pid allocated to a process + 1, size of tgid_map , GFP_KERNEL)
4716  If Not tgid_map Then
4718  Return -ENOMEM
4721  trace_event_enable_tgid_record(enabled)
4724  If mask == TRACE_ITER_EVENT_FORK Then trace_event_follow_fork(tr, enabled)
4727  If mask == TRACE_ITER_FUNC_FORK Then ftrace_pid_follow_fork(tr, enabled)
4730  If mask == TRACE_ITER_OVERWRITE Then
4731  ring_buffer_change_overwrite(buffer, enabled)
4737  If mask == TRACE_ITER_PRINTK Then
4738  trace_printk_start_stop_comm(enabled)
4739  trace_printk_control(enabled)
4742  Return 0
Caller
NameDescribe
trace_set_options
trace_options_core_write
__remove_instance
__irqsoff_tracer_init
__irqsoff_tracer_reset
__wakeup_tracer_init
wakeup_tracer_reset