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:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Constraints to check before allowing this new breakpoint counter:* == Non-pinned counter == (Considered as pinned for now)* - If attached to a single cpu, check:* (per_cpu(info->flexible, cpu) || (per_cpu(info->cpu_pinned, cpu)* +

Proto:static int __reserve_bp_slot(struct perf_event *bp, u64 bp_type)

Type:int

Parameter:

TypeParameterName
struct perf_event *bp
u64bp_type
270  struct bp_busy_slots slots = {0}
275  If Not constraints_initialized Then Return -ENOMEM
279  If bp_type == HW_BREAKPOINT_EMPTY || bp_type == HW_BREAKPOINT_INVALID Then Return -EINVAL
283  type = find_slot_idx(bp_type)
284  weight = hw_breakpoint_weight(bp)
286  Report the number of pinned/un-pinned breakpoints we have in* a given cpu (cpu > -1) or in all of them (cpu = -1).
291  For now, continue to consider flexible as pinned, until we can* ensure no flexible event can ever be scheduled before a pinned event* in a same cpu.
294  If pinned + Not Not flexible > nr_slots[type] Then Return -ENOSPC
297  Add/remove the given breakpoint in our constraint table
299  Return 0
Caller
NameDescribe
reserve_bp_slot
__modify_bp_slot
dbg_reserve_bp_slotAllow the kernel debugger to reserve breakpoint slots without* taking a lock using the dbg_* variant of for the reserve and* release breakpoint slots.