Function report |
Source Code:arch\x86\kernel\hw_breakpoint.c |
Create Date:2022-07-28 07:45:37 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int arch_install_hw_breakpoint(struct perf_event *bp)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct perf_event * | bp |
96 | info = counter_arch_bp(bp) |
101 | slot = this_cpu_ptr( & Stores the breakpoints currently in use on each breakpoint address* register for each cpus[i]) |
103 | If Not slot Then |
109 | If WARN_ONCE(i == Total number of available HW breakpoint registers , "Can't find any breakpoint slot") Then Return -EBUSY |
112 | set_debugreg(address, i) |
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 | If mask Then set_dr_addr_mask(mask, i) |
122 | Return 0 |
Name | Describe |
---|---|
kgdb_correct_hw_break |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |