Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_swevent_add

Proto:static int perf_swevent_add(struct perf_event *event, int flags)

Type:int

Parameter:

TypeParameterName
struct perf_event *event
intflags
8709  swhash = this_cpu_ptr( & swevent_htable)
8710  hwc = hw
8713  If is_sampling_event(event) Then
8714  last_period = sample_period
8715  We directly increment event->count and keep a second value in* is kept in the range [-sample_period, 0] so that we can use the* sign as trigger.
8718  state = Not (flags & start the counter when adding )
8720  head = For the event head insertion and removal in the hlist
8721  If WARN_ON_ONCE(!head) Then Return -EINVAL
8724  adds the specified element to the specified hlist
8725  Callers need to ensure there can be no nesting of this function, otherwise* the seqlock logic goes bad. We can not serialize this because the arch* code calls this from NMI context.
8727  Return 0