mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Add ddb show dpcpu_off command to ease dpcpu memory debugging.
While show pcpu prints pc_dynamic this also prints the original memory address as well as the maths. Once dpcpu goes NUMA this is considered to help debugging as well. Reviewed by: rwatson Approved by: re
This commit is contained in:
parent
281c86a4ef
commit
f2140faed1
1 changed files with 12 additions and 0 deletions
|
|
@ -313,6 +313,18 @@ sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS)
|
|||
}
|
||||
|
||||
#ifdef DDB
|
||||
DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off)
|
||||
{
|
||||
int id;
|
||||
|
||||
for (id = 0; id <= mp_maxid; id++) {
|
||||
if (CPU_ABSENT(id))
|
||||
continue;
|
||||
db_printf("dpcpu_off[%2d] = 0x%jx (+ DPCPU_START = %p)\n",
|
||||
id, (uintmax_t)dpcpu_off[id],
|
||||
(void *)(uintptr_t)(dpcpu_off[id] + DPCPU_START));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
show_pcpu(struct pcpu *pc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue