RFR: JDK-8301661: Enhance os::pd_print_cpu_info on macOS and Windows
Matthias Baesken
mbaesken at openjdk.org
Mon Feb 6 13:14:53 UTC 2023
On Fri, 3 Feb 2023 08:25:09 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> Enhance os::pd_print_cpu_info on macOS and Windows by information about CPU frequency and caches.
> On Windows , this info can be obtained by the Processor Power Information API or "powerbase" (CallNtPowerInformation , see https://learn.microsoft.com/en-us/windows/win32/api/powerbase/nf-powerbase-callntpowerinformation ); this is available since Windows Server 2003/XP.
> On macOS, sysctlbyname can be used.
Hi David, thanks for the comments. I did a few adjustments following your comments. Regarding
> Not sure about this mechanism versus adding it to Makefile ??
Both works. From what I see, currently we use the Makefile to set the lib deps, should I remove the pragma and use the Makefile ?
Regarding the processor count , probably we do not want to malloc anyway in pd_print_cpu_info so we have to live with the space buf provides.
Btw what you think about shortening the info, e.g. check if all processors have the same (M)Hz values and if it is the case just print once, this might look better and much less redundant in the output ?
-------------
PR: https://git.openjdk.org/jdk/pull/12403
More information about the hotspot-runtime-dev
mailing list