函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:TRACE_USER_STACK

函数原型:static enum print_line_t trace_user_stack_print(struct trace_iterator *iter, int flags, struct trace_event *event)

返回类型:enum print_line_t

参数:

类型参数名称
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  如果trace_flags按位与TRACE_ITER_SYM_USEROBJ
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  如果taskmm等于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 i小于Stack-trace entry:循环
1125  ip等于caller[i]
1127  如果非ip跟踪泛滥退出
1130  trace_seq_puts(s, " => ")
1131  seq_print_user_ip(s, mm, ip, flags)
1132  trace_seq_putc(s, '\n')
1135  如果mmDecrement the use count and release all resources for an mm.
1138  返回: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.