Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:u64 perf_swevent_set_period(struct perf_event *event)

Type:u64

Parameter:

TypeParameterName
struct perf_event *event>hw.period_left to count intervals. This period event
8477  hwc = hw
8478  period = last_period
8482  last_period = sample_period
8484  again :
8485  old = val = local64_read( & period_left)
8486  If val < 0 Then Return 0
8489  nr = div64_u64 - unsigned 64bit divide with 64bit divisor*@dividend: 64bit dividend*@divisor: 64bit divisor* This implementation is a modified version of the algorithm proposed* by the book 'Hacker's Delight'. The original source and full proof
8490  offset = nr * period
8491  val -= offset
8492  If local64_cmpxchg( & period_left, old, val) != old Then Go to again
8495  Return nr
Caller
NameDescribe
perf_swevent_overflow
perf_swevent_add
hw_breakpoint_add