mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[NTOSKRNL] Quickly implement the !defwrites in KDBG
This commit is contained in:
@@ -1427,6 +1427,32 @@ ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[])
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
ExpKdbgExtDefWrites(ULONG Argc, PCHAR Argv[])
|
||||
{
|
||||
KdbpPrint("CcTotalDirtyPages:\t%lu (%lu Kb)\n", CcTotalDirtyPages,
|
||||
(CcTotalDirtyPages * PAGE_SIZE) / 1024);
|
||||
KdbpPrint("CcDirtyPageThreshold:\t%lu (%lu Kb)\n", CcDirtyPageThreshold,
|
||||
(CcDirtyPageThreshold * PAGE_SIZE) / 1024);
|
||||
KdbpPrint("MmAvailablePages:\t%lu (%lu Kb)\n", MmAvailablePages,
|
||||
(MmAvailablePages * PAGE_SIZE) / 1024);
|
||||
|
||||
if (CcTotalDirtyPages >= CcDirtyPageThreshold)
|
||||
{
|
||||
KdbpPrint("CcTotalDirtyPages above the threshold, writes should be throttled\n");
|
||||
}
|
||||
else if (CcTotalDirtyPages + 64 >= CcDirtyPageThreshold)
|
||||
{
|
||||
KdbpPrint("CcTotalDirtyPages within 64 (max charge) pages of the threshold, writes may be throttled\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
KdbpPrint("CcTotalDirtyPages below the threshold, writes should not be throttled\n");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
||||
@@ -94,6 +94,7 @@ static BOOLEAN KdbpCmdDmesg(ULONG Argc, PCHAR Argv[]);
|
||||
BOOLEAN ExpKdbgExtPool(ULONG Argc, PCHAR Argv[]);
|
||||
BOOLEAN ExpKdbgExtPoolUsed(ULONG Argc, PCHAR Argv[]);
|
||||
BOOLEAN ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[]);
|
||||
BOOLEAN ExpKdbgExtDefWrites(ULONG Argc, PCHAR Argv[]);
|
||||
|
||||
#ifdef __ROS_DWARF__
|
||||
static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]);
|
||||
@@ -188,6 +189,7 @@ static const struct
|
||||
{ "!pool", "!pool [Address [Flags]]", "Display information about pool allocations.", ExpKdbgExtPool },
|
||||
{ "!poolused", "!poolused [Flags [Tag]]", "Display pool usage.", ExpKdbgExtPoolUsed },
|
||||
{ "!filecache", "!filecache", "Display cache usage.", ExpKdbgExtFileCache },
|
||||
{ "!defwrites", "!defwrites", "Display cache write values.", ExpKdbgExtDefWrites },
|
||||
};
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user