函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_swevent_add

函数原型:static int perf_swevent_add(struct perf_event *event, int flags)

返回类型:int

参数:

类型参数名称
struct perf_event *event
intflags
8709  swhash等于this_cpu_ptr( & swevent_htable)
8710  hwc等于hw
8713  如果is_sampling_event(event)则
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等于非flags按位与start the counter when adding 的值
8720  head等于For the event head insertion and removal in the hlist
8721  如果WARN_ON_ONCE(!head)则返回:负EINVAL
8724  添加哈希记录
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  返回:0