winsiderss / systeminformer

A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware. Brought to you by Winsider Seminars & Solutions, Inc. @ http://www.windows-internals.com
https://systeminformer.sourceforge.io
MIT License
10.55k stars 1.36k forks source link

Display core parking indicator when hovering the mouse over the processor graphs #2040

Closed wnstngs closed 1 month ago

wnstngs commented 2 months ago

Purpose

Starting with Windows 7, the thread scheduler and processor power manager are able to park processors for power saving purposes. Parking a processor makes it unavailable for thread scheduling, which contributes to potentially putting this processor into a deep idle state and thus reducing power consumption. Parked cores are marked as "Parked" in Task Manager, but not in System Informer.

This PR adds support for displaying core parking status in the tooltip when hovering over the processor graphs. Previously there was a proposal to add such a feature: https://github.com/winsiderss/systeminformer/issues/1083

Proposed changes

1) Function that determines whether a core is parked. This uses the powerful CPU Sets mechanism available since Windows 10. Currently, every logical processor has a CPU Set and this looks like the most convenient and reliable way to determine if a specific core is parked. 2) Display "Parked" in the tooltip if the core is parked. https://imgur.com/a/Z1iDT8W

TODO?

1) Revise the tooltip formatting code, as in the current form it easily becomes even more confusing when adding new functionality (format indexes change depending on different conditions). For example, at least use named variables for indexes of certain components of the tooltip (load percentages, relationships, time, and so on). 2) Consider using the CPU Sets mechanism in more places.

github-actions[bot] commented 2 months ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

wnstngs commented 2 months ago

I have read the CLA Document and I hereby sign the CLA

wnstngs commented 1 month ago

@jxy-s Thank you!