函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__find_next_entry

函数原型:static struct trace_entry *__find_next_entry(struct trace_iterator *iter, int *ent_cpu, unsigned long *missing_events, u64 *ent_ts)

返回类型:struct trace_entry

参数:

类型参数名称
struct trace_iterator *iter
int *ent_cpu
unsigned long *missing_events
u64 *ent_ts
3387  buffer等于buffer
3388  struct trace_entry * ent, * next = NULL
3389  lost_events等于0, next_lost等于0
3390  cpu_file等于cpu_file
3391  next_ts等于0
3392  next_cpu等于负1
3393  next_size等于0
3400  如果cpu_file大于RING_BUFFER_ALL_CPUS
3401  如果g_buffer_empty_cpu - is a cpu buffer of a ring buffer empty?*@buffer: The ring buffer*@cpu: The CPU buffer to test则返回:NULL
3403  ent等于peek_next_entry(iter, cpu_file, ent_ts, missing_events)
3404  如果ent_cpuent_cpu等于cpu_file
3407  返回:ent
3410  for_each_tracing_cpu(cpu)
3412  如果g_buffer_empty_cpu - is a cpu buffer of a ring buffer empty?*@buffer: The ring buffer*@cpu: The CPU buffer to test则继续下一循环
3415  ent等于peek_next_entry(iter, cpu, & ts, & lost_events)
3420  如果ent且非nextts小于next_ts的值则
3421  next等于ent
3422  next_cpu等于cpu
3423  next_ts等于ts
3424  next_lost等于lost_events
3425  next_size等于ent_size
3429  ent_size等于next_size
3431  如果ent_cpuent_cpu等于next_cpu
3434  如果ent_tsent_ts等于next_ts
3437  如果missing_eventsmissing_events等于next_lost
3440  返回:next
调用者
名称描述
trace_find_next_entryFind the next real entry, without updating the iterator itself
trace_find_next_entry_incFind the next real entry, and increment the iterator to the next entry