Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:35:43
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ring_buffer_attach

Proto:static void ring_buffer_attach(struct perf_event *event, struct ring_buffer *rb)

Type:void

Parameter:

TypeParameterName
struct perf_event *event
struct ring_buffer *rb
5554  struct ring_buffer * old_rb = NULL
5557  If rb Then
5562  WARN_ON_ONCE(rcu_pending)
5564  old_rb = rb
5565  spin_lock_irqsave( & poll crap , flags)
5566  list_del_rcu - deletes entry from list without re-initialization*@entry: the element to delete from the list
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  If rb Then
5574  If rcu_pending Then
5576  rcu_pending = 0
5579  spin_lock_irqsave( & poll crap , flags)
5580  list_add_rcu - add a new entry to rcu-protected list*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head
5581  spin_unlock_irqrestore( & poll crap , flags)
5594  If has_aux(event) Then 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  If old_rb Then
5600  ring_buffer_put(old_rb)
5606  wake_up_all( & waitq)
Caller
NameDescribe
_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