Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_callchain_buffers

Proto:int get_callchain_buffers(int event_max_stack)

Type:int

Parameter:

TypeParameterName
intevent_max_stack
110  err = 0
113  mutex_lock( & callchain_mutex)
115  count = atomic_inc_return( & nr_callchain_events)
116  If WARN_ON_ONCE(count < 1) Then
117  err = -EINVAL
118  Go to exit
128  If event_max_stack > sysctl_perf_event_max_stack Then
129  err = -EOVERFLOW
130  Go to exit
133  If count == 1 Then err = alloc_callchain_buffers()
135  exit :
136  If err Then atomic_dec( & nr_callchain_events)
139  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
141  Return err
Caller
NameDescribe
stack_map_allocCalled from syscall
perf_event_allocAllocate and initialize an event structure