Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:TRACE_USER_STACK

Proto:static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, int flags, struct trace_event *event)

Type:enum print_line_t

Parameter:

TypeParameterName
struct trace_iterator *iter
intflags
struct trace_event *event
1101  tr = tr
1103  s = The below is zeroed out in pipe_read
1104  struct mm_struct * mm = NULL
1107  The trace_assign_type is a verifier that the entry type is* the same as the type being assigned. To add new types simply* add a line with the following format:* IF_ASSIGN(var, ent, type, id);* Where "type" is the trace type that includes the trace_entry(field, ent)
1109  trace_seq_puts(s, "<user stack trace>\n")
1111  If trace_flags & TRACE_ITER_SYM_USEROBJ Then
1117  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1118  task = find_task_by_vpid(tgid)
1119  If task Then mm = get_task_mm - acquire a reference to the task's mm* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning* this kernel workthread has transiently adopted a user mm with use_mm,* to do its AIO) is not set and if so returns a reference to it, after
1121  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1124  When i < Stack-trace entry: cycle
1125  ip = caller[i]
1127  If Not ip || race_seq_has_overflowed - return true if the trace_seq took too much*@s: trace sequence descriptor* Returns true if too much data was added to the trace_seq and it is* now full and will not take anymore. Then Break
1130  trace_seq_puts(s, " => ")
1131  seq_print_user_ip(s, mm, ip, flags)
1132  trace_seq_putc(s, '\n')
1135  If mm Then Decrement the use count and release all resources for an mm.
1138  Return Several functions return TRACE_TYPE_PARTIAL_LINE if the trace_seq* overflowed, and TRACE_TYPE_HANDLED otherwise. This helper function* simplifies those functions and keeps them in sync.