函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int arch_install_hw_breakpoint(struct perf_event *bp)

返回类型:int

参数:

类型参数名称
struct perf_event *bp
96  info等于counter_arch_bp(bp)
100 i小于Total number of available HW breakpoint registers 循环
101  slot等于this_cpu_ptr( & Stores the breakpoints currently in use on each breakpoint address* register for each cpus[i])
103  如果非slot
104  slot等于bp
105  退出
109  如果WARN_ONCE(i == Total number of available HW breakpoint registers , "Can't find any breakpoint slot")则返回:负EBUSY
112  set_debugreg(address, i)
113  __this_cpu_write(Per cpu debug address registers values [i], address)
115  dr7等于this_cpu_ptr( & Per cpu debug control register value )
116  dr7或等于Encode the length, type, Exact, and Enable bits for a particular breakpoint* as stored in debug register 7.
118  set_debugreg( * dr7, 7)
119  如果maskset_dr_addr_mask(mask, i)
122  返回:0
调用者
名称描述
kgdb_correct_hw_break
hw_breakpoint_add