Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\callchain.c Create Date:2022-07-28 13:43:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:get_perf_callchain

Proto:struct perf_callchain_entry *get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user, u32 max_stack, bool crosstask, bool add_mark)

Type:struct perf_callchain_entry

Parameter:

TypeParameterName
struct pt_regs *regs
u32init_nr
boolkernel
booluser
u32max_stack
boolcrosstask
booladd_mark
185  entry = get_callchain_entry( & rctx)
186  If rctx == -1 Then Return NULL
189  If Not entry Then Go to exit_put
192  entry = entry
193  max_stack = max_stack
194  nr = nr = init_nr
195  contexts = 0
196  contexts_maxed = false
198  If kernel && Not ser_mode(regs) determines whether a register set came from user* mode Then
199  If add_mark Then perf_callchain_store_context( & ctx, PERF_CONTEXT_KERNEL)
201  perf_callchain_kernel( & ctx, regs)
204  If user Then
206  If mm Then regs = task_pt_regs(current process)
208  Else regs = NULL
212  If regs Then
215  If crosstask Then Go to exit_put
221  fs = get_fs()
222  set_fs(USER_DS)
224  set_fs(fs)
228  exit_put :
229  put_callchain_entry(rctx)
231  Return entry
Caller
NameDescribe
____bpf_get_stackid
____bpf_get_stack
perf_callchain