Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\hw_breakpoint.c Create Date:2022-07-28 13:43:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hw_breakpoint_add

Proto:static int hw_breakpoint_add(struct perf_event *bp, int flags)

Type:int

Parameter:

TypeParameterName
struct perf_event *bp
intflags
624  If Not (flags & start the counter when adding ) Then state = PERF_HES_STOPPED
627  If is_sampling_event(bp) Then
628  last_period = sample_period
629  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.
632  Return Install a perf counter breakpoint.* We seek a free debug address register and use it for this* breakpoint. Eventually we enable it in the debug control register.* Atomic: we hold the counter->ctx->lock and we only handle variables