mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 20:03:12 +00:00
[NTOSKRNL] Quickly implement the !defwrites in KDBG
This commit is contained in:
parent
0518444217
commit
d35243d4e0
2 changed files with 28 additions and 0 deletions
|
@ -1427,6 +1427,32 @@ ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[])
|
||||||
|
|
||||||
return TRUE;
|
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
|
#endif
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -94,6 +94,7 @@ static BOOLEAN KdbpCmdDmesg(ULONG Argc, PCHAR Argv[]);
|
||||||
BOOLEAN ExpKdbgExtPool(ULONG Argc, PCHAR Argv[]);
|
BOOLEAN ExpKdbgExtPool(ULONG Argc, PCHAR Argv[]);
|
||||||
BOOLEAN ExpKdbgExtPoolUsed(ULONG Argc, PCHAR Argv[]);
|
BOOLEAN ExpKdbgExtPoolUsed(ULONG Argc, PCHAR Argv[]);
|
||||||
BOOLEAN ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[]);
|
BOOLEAN ExpKdbgExtFileCache(ULONG Argc, PCHAR Argv[]);
|
||||||
|
BOOLEAN ExpKdbgExtDefWrites(ULONG Argc, PCHAR Argv[]);
|
||||||
|
|
||||||
#ifdef __ROS_DWARF__
|
#ifdef __ROS_DWARF__
|
||||||
static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]);
|
static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]);
|
||||||
|
@ -188,6 +189,7 @@ static const struct
|
||||||
{ "!pool", "!pool [Address [Flags]]", "Display information about pool allocations.", ExpKdbgExtPool },
|
{ "!pool", "!pool [Address [Flags]]", "Display information about pool allocations.", ExpKdbgExtPool },
|
||||||
{ "!poolused", "!poolused [Flags [Tag]]", "Display pool usage.", ExpKdbgExtPoolUsed },
|
{ "!poolused", "!poolused [Flags [Tag]]", "Display pool usage.", ExpKdbgExtPoolUsed },
|
||||||
{ "!filecache", "!filecache", "Display cache usage.", ExpKdbgExtFileCache },
|
{ "!filecache", "!filecache", "Display cache usage.", ExpKdbgExtFileCache },
|
||||||
|
{ "!defwrites", "!defwrites", "Display cache write values.", ExpKdbgExtDefWrites },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue