函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-27 14:55:19
Last Modify:2022-05-20 07:50:19 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ring_buffer_attach

函数原型:static void ring_buffer_attach(struct perf_event *event, struct ring_buffer *rb)

返回类型:void

参数:

类型参数名称
struct perf_event *event
struct ring_buffer *rb
5554  struct ring_buffer * old_rb = NULL
5557  如果rb
5562  WARN_ON_ONCE(rcu_pending)
5564  old_rb等于rb
5565  spin_lock_irqsave( & poll crap , flags)
5566  删除不需要重新初始化的列表项
5567  spin_unlock_irqrestore( & poll crap , flags)
5569  rcu_batches等于get_state_synchronize_rcu - Snapshot current RCU state* Returns a cookie that is used by a later call to cond_synchronize_rcu()* to determine whether or not a full grace period has elapsed in the* meantime.
5570  rcu_pending等于1
5573  如果rb
5574  如果rcu_pending
5576  rcu_pending等于0
5579  spin_lock_irqsave( & poll crap , flags)
5580  添加RCU保护项
5581  spin_unlock_irqrestore( & poll crap , flags)
5594  如果has_aux(event)则perf_event_stop(event, 0)
5597  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(rb, rb)
5599  如果old_rb
5600  ring_buffer_put(old_rb)
5606  wake_up_all( & waitq)
调用者
名称描述
_free_event
perf_mmap_closeA buffer can be mmap()ed multiple times; either directly through the same* event, or through other events by use of perf_event_set_output().* In order to undo the VM accounting done by perf_mmap() we need to destroy
perf_mmap
perf_event_set_output