Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__find_next_entry

Proto:static struct trace_entry *__find_next_entry(struct trace_iterator *iter, int *ent_cpu, unsigned long *missing_events, u64 *ent_ts)

Type:struct trace_entry

Parameter:

TypeParameterName
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  If cpu_file > RING_BUFFER_ALL_CPUS Then
3401  If g_buffer_empty_cpu - is a cpu buffer of a ring buffer empty?*@buffer: The ring buffer*@cpu: The CPU buffer to test Then Return NULL
3403  ent = peek_next_entry(iter, cpu_file, ent_ts, missing_events)
3404  If ent_cpu Then ent_cpu = cpu_file
3407  Return ent
3410  for_each_tracing_cpu(cpu)
3412  If g_buffer_empty_cpu - is a cpu buffer of a ring buffer empty?*@buffer: The ring buffer*@cpu: The CPU buffer to test Then Continue
3415  ent = peek_next_entry(iter, cpu, & ts, & lost_events)
3420  If ent && ( Not next || ts < next_ts ) Then
3421  next = ent
3422  next_cpu = cpu
3423  next_ts = ts
3425  next_size = ent_size
3429  ent_size = next_size
3431  If ent_cpu Then ent_cpu = next_cpu
3434  If ent_ts Then ent_ts = next_ts
3437  If missing_events Then missing_events = next_lost
3440  Return next
Caller
NameDescribe
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