函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events.c Create Date:2022-07-27 13:25:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__ftrace_event_enable_disable

函数原型:static int __ftrace_event_enable_disable(struct trace_event_file *file, int enable, int soft_disable)

返回类型:int

参数:

类型参数名称
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  :enable恒等于0
386  如果soft_disable
391  否则disable等于非* 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  如果* 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设置内存位
411  否则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  退出
414  :enable恒等于1
423  如果非soft_disablelear_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  否则
438  如果trace_flags按位与TRACE_ITER_RECORD_CMD
439  cmd = true
444  如果trace_flags按位与TRACE_ITER_RECORD_TGID
445  tgid = true
451  如果ret
454  如果tgidtracing_stop_tgid_record()
456  打印信息("event trace: Could not enable event %s\n", trace_event_name(call))
458  退出
465  退出
469  如果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的值则
471  如果* 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_DISABLEDrace_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  否则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  返回:ret
调用者
名称描述
trace_event_enable_disable
ftrace_event_enable_disable