Add debugging stats for XMem
This commit is contained in:
parent
4dde777570
commit
344d3887c4
@ -4,6 +4,7 @@
|
||||
|
||||
#include <sys/kconfig.h>
|
||||
#include <sys/kassert.h>
|
||||
#include <sys/kdebug.h>
|
||||
#include <sys/kmem.h>
|
||||
|
||||
#include <machine/amd64.h>
|
||||
@ -113,3 +114,20 @@ XMem_Allocate(XMem *xmem, uintptr_t length)
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
Debug_XMemStats(int argc, const char *argv[])
|
||||
{
|
||||
int r;
|
||||
|
||||
kprintf("Region Nr: %16s %16s\n", "Base", "Length");
|
||||
for (r = 0; r < MAX_XMEM_REGIONS; r++)
|
||||
{
|
||||
if (regions[r].inUse) {
|
||||
kprintf("Region %2d: %016llx %016llx\n", r,
|
||||
regions[r].base, regions[r].length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_DBGCMD(xmemstats, "XMem statistics", Debug_XMemStats);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user