** WIP ** [TASKMGR] Get rid of thread-oriented updates. Just do it synchronously on WM_TIMER.
** WIP ** Merge RefreshPerformancePage() and PerformancePageRefreshThread(), now that we removed the separate performance page refreshing thread.
- Use _ui64tow() instead of _ultow() for converting ULONGLONGs into
a string representation.
- Isolate the update of the status bar.
- Isolate the actual graphs redrawing. The idea for later is to not
trigger any redrawings (and run unnecessary code) if the page is deactivated.
[TASKMGR] No need to get and save global handles for all the controls in the performance page.
... and especially for controls that are used only in one place.
Only handles to the graph controls are sufficient. For the others,
we can manage by using dialog control IDs.
- Rename AdjustFrameSize() 'pos' parameter to be more explicit.
** WIP ** Group trios of Memory performance getters together, as they are always used in succession.
- Group PerfDataGetCommitCharge[Total|Limit|Peak]K() together into
PerfDataGetCommitChargeK().
- Group PerfDataGetKernelMemory[Total|Paged|NonPaged]K() together
into PerfDataGetKernelMemoryK().
- Group PerfDataGetPhysicalMemory[Total|Available|SystemCache]K()
together into PerfDataGetPhysicalMemoryK().
- Use these new Mem performance getters.
[TASKMGR] Use owner-drawn performance graphs.
- Use owner-drawn buttons to implement correct graph painting while
maintaining the 3D appearance. As done on Windows (TM)
Why using buttons (that should be disabled btw.)?
Because we want, if the graphs fail to be created (due to e.g.
lack of resources), to show a descriptive label of what's missing.
This also allow the graphs to be drawn **properly** inside a 3D-border window.
- Redraw graphs on WM_DRAWITEM.
- Don't need to subclass button controls.
- Use DeferWindowPos() to avoid controls blinking on resize.
- Fix the problem of the buttons resizing as "1/x": this was due to
the fact, using GetClientRect + Mapping, did't take the border into
account. Instead, use GetWindowRect + a different coord mapping to
fix all that.
- Remove some dead code.
- Rename the remaining ridiculously long variable names.
** WIP ** CPU/Mem meters: keep a separate copy of the CPU/Mem perf values.
+ Use structure for keeping state.
** WIP ** Add support for multiple-CPU stats. (In progress, needs code cleanup.)
In particular, use SystemProcessorTimeInfo to calculate the idle time
as done in ROSAPPS' ctm.exe, see commit c0873723.
See also https://ladydebug.com/blog/codes/cpuusage_win.htm
+ Fix the problem of NtQuerySystemInformation(SystemPerformanceInformation)
that shows up when running a 32-bit build under Windows 7 x64.
** WIP ** Investigating showing physical memory in the MEM gauge.
TODO: fix lgdt macro to work with GAAS and ML
Works with PIIX3 and cdrom on AHCI or SCSI controller
When cdrom is on IDE controller it doesn't seem to work
Check if the stack pointer is out of bounds, before trying to unwind a frame. This will not fix any crashes, but it prevents simple crashes from going into a recursive exception.
In C99 mode GCC emits global symbols for inline functions, as soon as the compilation unit contains a declaration that marks the function as "extern". A number of functions like printf are implicitly declared as extern by GCC, which seemingly cannot be disabled. This would lead to the inline function being emitted as a global symbol in every compilation unit. Using static inline prevents duplicate symbol errors.
This command was removed in commit baa47fa5e0
because there was no way to get the CRx registers from a CONTEXT structure.
Previous code was also displaying current GDTR/LDTR and IDT.
Rewrite the code to use KdSystemDebugControl(SysDbgReadControlSpace, ...)
to get CRx, GDTR/LDTR and IDT values just before entering debugger.
This reverts commit 3b3741c10a of #7679 .
It seems like the shell icon size is not the
system icon size.
The wide string L"Shell Small Icon Size" is detected in
shell32.dll and themeui.dll.
No L"Shell Small Icon Size" in win32k.sys found.
JIRA issue: CORE-12905
Move these out of ACPI in preparation for ACPI_NEW so they keep their juicy commit history.
Also both ACPIs can coexist for awhile as I don't see the old driver getting removed anytime soon.
WinDBG can do some local debugging using 'windbg -kl'. In that case,
WinDBG tries to directly use NtSystemDebugControl. If this function
returns an error, WinDBG extracts a driver from its resources.
WinDBG will send IOCTLs to this driver, and this driver will call
KdSystemDebugControl.
However, on livecd (where %SYSTEMROOT% is read-only), WinDBG is unable
to extract the driver from its resources, and can't use the driver to
call KdSystemDebugControl.
As a work-around, allow all control classes in NtSystemDebugControl
in case of livecd.
WinDBG local debugging now also works on livecd (windbg -kl).