[RFR] 8202427: Enhance os::print_memory_info on Windows

Baesken, Matthias matthias.baesken at sap.com
Mon Apr 30 14:52:44 UTC 2018


On Windows,
the os::print_memory_info  misses a few  memory-related infos that might be interesting :
- current and peak WorkingSet size  (= physical memory assigned to the process)
- current and peak commit charge  (also known as "private bytes" in Windows tools)
- on 32bit Windows :
user-mode portion/free user mode portion  of virtual address-space (Total/AvailVirtual) because it shows how close do we get to the 2-4 GB per process border.


- the current naming of "swap/free-swap" memory is a bit misleading;
in the Windows world swap is a special page file used for UWP apps.
(see Windows Internals :  "The swap file"  (chapter 5 Memory management)
Windows 8 added another page file called a swap file. It is ... exclusively used for UWP (Universal Windows Platform) apps.
Our output (ullTotalPageFile and ullAvailPageFile) is NOT about the UWP related values, it is about page file sizes
(so calling it TotalPageFile/AvailPageFile in "Windows-speak" or just virtual memory might be more appropriate).


https://msdn.microsoft.com/de-de/library/windows/desktop/aa366770(v=vs.85).aspx

documents it in the following way:
ullTotalPageFile:
The current committed memory limit for the system or the current process, whichever is smaller,...

ullAvailPageFile :
The maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value



Aditionally I suggest having output of the various memory-values  in M (megabyte) as well , the k  (kilobyte) output sometimes gives very high and unreadable numbers).


Could you please  review my change ?


Bug :

https://bugs.openjdk.java.net/browse/JDK-8202427


Change :

http://cr.openjdk.java.net/~mbaesken/webrevs/8202427.0/


Thanks, Matthias




More information about the hotspot-dev mailing list