Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:perf_swevent_init

Proto:static int perf_swevent_init(struct perf_event *event)

Type:int

Parameter:

TypeParameterName
struct perf_event *event
8846  event_id = config
8848  If type != PERF_TYPE_SOFTWARE Then Return -ENOENT
8854  If has_branch_stack(event) Then Return -EOPNOTSUPP
8858  Case event_id == PERF_COUNT_SW_CPU_CLOCK
8859  Case event_id == PERF_COUNT_SW_TASK_CLOCK
8860  Return -ENOENT
8862  Default
8863  Break
8866  If event_id >= PERF_COUNT_SW_MAX Then Return -ENOENT
8869  If Not parent Then
8872  err = swevent_hlist_get()
8873  If err Then Return err
8876  static_key_slow_inc( & perf_swevent_enabled[event_id])
8877  destroy = sw_perf_event_destroy
8880  Return 0