函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\hw_breakpoint.c Create Date:2022-07-27 15:05:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:hw_breakpoint_add

函数原型:static int hw_breakpoint_add(struct perf_event *bp, int flags)

返回类型:int

参数:

类型参数名称
struct perf_event *bp
intflags
624  如果非flags按位与start the counter when adding 的值则state等于PERF_HES_STOPPED
627  如果is_sampling_event(bp)则
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  返回: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