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:
Bjoern A. Zeeb 2009-08-12 12:06:16 +00:00
parent 281c86a4ef
commit f2140faed1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196132

View File

@ -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)