Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:stack_map_get_build_id_offset

Proto:static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs, u64 *ips, u32 trace_nr, bool user)

Type:void

Parameter:

TypeParameterName
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  If Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.() Then
291  work = this_cpu_ptr( & up_read_work)
292  If atomic_read( & flags) & IRQ_WORK_BUSY Then irq_work_busy = true
307  If Not user || Not current process || Not mm || irq_work_busy || rylock for reading -- returns 1 if successful, 0 if contention == 0 Then
310  When i < trace_nr cycle
312  ip = ips[i]
315  Return
318  When i < trace_nr cycle
319  vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
323  ip = ips[i]
325  Continue
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  If Not work Then
333  lease a read lock
334  Else
335  sem = mmap_sem
336  Enqueue the irq work @work on the current CPU
342  rwsem_release( & dep_map, _RET_IP_)
Caller
NameDescribe
____bpf_get_stackid
____bpf_get_stack