Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__ftrace_event_enable_disable

Proto:static int __ftrace_event_enable_disable(struct trace_event_file *file, int enable, int soft_disable)

Type:int

Parameter:

TypeParameterName
struct trace_event_file *file
intenable
intsoft_disable
365  call = event_call
366  tr = tr
367  file_flags = * 32 bit flags: * bit 0: enabled * bit 1: enabled cmd record * bit 2: enable/disable with the soft disable bit * bit 3: soft disabled * bit 4: trigger enabled * Note: The bits must be set atomically to prevent races * from other writers. Reads of flags do
368  ret = 0
372  Case enable == 0
386  If soft_disable Then
391  Else disable = Not (* 32 bit flags: * bit 0: enabled * bit 1: enabled cmd record * bit 2: enable/disable with the soft disable bit * bit 3: soft disabled * bit 4: trigger enabled * Note: The bits must be set atomically to prevent races * from other writers. Reads of flags do & EVENT_FILE_FL_SOFT_MODE)
409  If * 32 bit flags: * bit 0: enabled * bit 1: enabled cmd record * bit 2: enable/disable with the soft disable bit * bit 3: soft disabled * bit 4: trigger enabled * Note: The bits must be set atomically to prevent races * from other writers. Reads of flags do & EVENT_FILE_FL_SOFT_MODE Then Atomically set a bit in memory
411  Else lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
413  Break
414  Case enable == 1
423  If Not soft_disable Then lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
425  Else
451  If ret Then
454  If tgid Then tracing_stop_tgid_record()
456  pr_info("event trace: Could not enable event %s\n", trace_event_name(call))
458  Break
465  Break
469  If (file_flags & EVENT_FILE_FL_SOFT_DISABLED) != (* 32 bit flags: * bit 0: enabled * bit 1: enabled cmd record * bit 2: enable/disable with the soft disable bit * bit 3: soft disabled * bit 4: trigger enabled * Note: The bits must be set atomically to prevent races * from other writers. Reads of flags do & EVENT_FILE_FL_SOFT_DISABLED) Then
471  If * 32 bit flags: * bit 0: enabled * bit 1: enabled cmd record * bit 2: enable/disable with the soft disable bit * bit 3: soft disabled * bit 4: trigger enabled * Note: The bits must be set atomically to prevent races * from other writers. Reads of flags do & EVENT_FILE_FL_SOFT_DISABLED Then race_buffered_event_enable - enable buffering events* When events are being filtered, it is quicker to use a temporary* buffer to write the event data into if there's a likely chance* that it will not be committed
473  Else race_buffered_event_disable - disable buffering events* When a filter is removed, it is faster to not use the buffered* events, and to commit directly into the ring buffer. Free up* the temp buffers when there are no more users. This requires
477  Return ret
Caller
NameDescribe
trace_event_enable_disable
ftrace_event_enable_disable