函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:trace_event_raw_event_synth

函数原型:static notrace void trace_event_raw_event_synth(void *__data, u64 *var_ref_vals, unsigned int *var_ref_idx)

返回类型:void

参数:

类型参数名称
void *__data
u64 *var_ref_vals
unsigned int *var_ref_idx
881  trace_file等于__data
887  fields_size等于0
889  event等于data
891  如果race_trigger_soft_disabled - do triggers and test if soft disabled*@file: The file pointer of the event to test* If any triggers without filters are attached to this event, they* will be called here则返回
894  fields_size等于n_u64sizeof(u64)
900  buffer等于buffer
901  g_buffer_nest_start - Allow to trace while nested*@buffer: The ring buffer to modify* The ring buffer has a safety mechanism to prevent recursion.* But there may be a case where a trace needs to be done while* tracing something else
903  entry等于trace_event_buffer_reserve( & fbuffer, trace_file, entry的长度 + fields_size)
905  如果非entry则转到:out
908 i小于n_fields循环
909  val_idx等于var_ref_idx[i]
910  如果is_string
912  char * str_field = (char * ) & fields[n_u64]
916  否则
917  field等于fields[i]
918  val等于var_ref_vals[val_idx]
921  :size恒等于1
922  * (u8 * ) & fields[n_u64] = val
923  退出
925  :size恒等于2
926  * (u16 * ) & fields[n_u64] = val
927  退出
929  :size恒等于4
930  * (u32 * ) & fields[n_u64] = val
931  退出
933  默认
934  fields[n_u64]等于val
935  退出
937  n_u64自加
941  trace_event_buffer_commit( & fbuffer)
942  out :
943  g_buffer_nest_end - Allow to trace while nested*@buffer: The ring buffer to modify* Must be called after ring_buffer_nest_start() and after the* ring_buffer_unlock_commit().