函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:stack_map_get_build_id_offset

函数原型:static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs, u64 *ips, u32 trace_nr, bool user)

返回类型:void

参数:

类型参数名称
struct bpf_stack_build_id *id_offs
u64 *ips
u32trace_nr
booluser
287  bool irq_work_busy = false
288  struct stack_map_irq_work * work = NULL
290  如果已禁止中断()则
291  work等于this_cpu_ptr( & up_read_work)
292  如果atomic_read( & flags)按位与IRQ_WORK_BUSYirq_work_busy = true
307  如果非user或非当前进程或非mmirq_work_busyrylock for reading -- returns 1 if successful, 0 if contention恒等于0则
310 i小于trace_nr循环
312  ip等于ips[i]
315  返回
318 i小于trace_nr循环
319  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
323  ip等于ips[i]
325  继续下一循环
327  offset等于Offset (within vm_file) in PAGE_SIZEunits 左移PAGE_SHIFT determines the page size 位的值加ips[i]减Our start address within vm_mm.
329  status等于BPF_STACK_BUILD_ID_VALID
332  如果非work
333  lease a read lock
334  否则
335  sem等于mmap_sem
336  Enqueue the irq work @work on the current CPU
342  rwsem_release( & dep_map, _RET_IP_)
调用者
名称描述
____bpf_get_stackid
____bpf_get_stack