函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This is called before hardware starts writing to the AUX area to* obtain an output handle and make sure there's room in the buffer

函数原型:void *perf_aux_output_begin(struct perf_output_handle *handle, struct perf_event *event)

返回类型:void

参数:

类型参数名称
struct perf_output_handle *handle
struct perf_event *event
362  output_event等于event
367  如果parentoutput_event等于parent
375  rb等于ring_buffer_get(output_event)
376  如果非rb则返回:NULL
379  如果非rb_has_aux(rb)则转到:err
390  如果非atomic_read( & aux_mmap_count)则转到:err
393  如果非_inc_not_zero - increment a refcount unless it is 0*@r: the refcount to increment* Similar to atomic_inc_not_zero(), but will saturate at REFCOUNT_SATURATED* and WARN.* Provides no memory ordering, it is assumed the caller has guaranteed the则转到:err
396  nest等于READ_ONCE(aux_nest)
401  如果WARN_ON_ONCE(nest)则转到:err_put
404  WRITE_ONCE(aux_nest, nest + 1)
406  aux_head等于 AUX area
408  rb等于rb
409  event等于event
410  head等于aux_head
411  size等于0
412  aux_flags等于0
419  如果非aux_overwrite
420  aux_tail等于READ_ONCE(aux_tail)
421  wakeup等于 last aux_watermark boundary crossed by aux_head aux_watermark
422  如果aux_headaux_tail小于perf_aux_size(rb)则size等于Return space available, 0..size-1. We always leave one free charas a completely full buffer has head == tail, which is the same asempty. (aux_head, aux_tail, perf_aux_size(rb))
430  如果非size
433  WRITE_ONCE(aux_nest, 0)
434  转到:err_put
438  返回:aux_priv
440  err_put :
442  rb_free_aux(rb)
444  err :
445  ring_buffer_put(rb)
446  event = NULL
448  返回:NULL