diff options
author | bz <bz@FreeBSD.org> | 2009-08-12 12:06:16 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-08-12 12:06:16 +0000 |
commit | b0afe6f044707e941c997570db03b56fea5a72b3 (patch) | |
tree | d3b78e2558baf0b881f3fe1ea0ddaa25eb18cb17 /sys/kern | |
parent | a5f0cffcb437cb9aeb35d41f844e19d9d8cdc033 (diff) | |
download | FreeBSD-src-b0afe6f044707e941c997570db03b56fea5a72b3.zip FreeBSD-src-b0afe6f044707e941c997570db03b56fea5a72b3.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_pcpu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index c0372b0..5610980 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -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) |