RFR: 8198225: os::attempt_reserve_memory_at records memory as committed
Stefan Karlsson
stefan.karlsson at oracle.com
Thu Feb 15 15:19:49 UTC 2018
Hi all,
Please review this small patch to fix the NMT memory tracking for
os::attempt_reserve_memory_at.
http://cr.openjdk.java.net/~stefank/8198225/webrev.01/
https://bugs.openjdk.java.net/browse/JDK-8198225
This problem could be seen in the NMT output (Note: the fix for
JDK-8196405 was also applied when this was generated):
Total: reserved=18728431KB, committed=18463315KB
- Java Heap (reserved=16437248KB, committed=16437248KB)
(mmap: reserved=16437248KB,
committed=16437248KB)
- Class (reserved=1078402KB, committed=1077890KB)
and
[0x00000007c0000000 - 0x0000000800000000] reserved and committed
1048576KB for Class from
[0x00002b96ab32655c] ReservedSpace::ReservedSpace(unsigned long,
unsigned long, bool, char*)+0xac
[0x00002b96aaea116b]
Metaspace::allocate_metaspace_compressed_klass_ptrs(char*, unsigned
char*)+0x15b
[0x00002b96aaea36bc] Metaspace::global_initialize()+0x24c
[0x00002b96ab2c589f] universe_init()+0x8f
[0x00000007c0000000 - 0x00000007c0340000] committed 3328KB from
[0x00002b96ab31fb35] commit_expanded(char*, unsigned long,
unsigned long, bool, bool)+0x25
[0x00002b96ab320d52] VirtualSpace::expand_by(unsigned long,
bool)+0x342
[0x00002b96aae9466f] VirtualSpaceNode::expand_by(unsigned
long, unsigned long)+0x4f
[0x00002b96aae953b0]
VirtualSpaceList::expand_node_by(VirtualSpaceNode*, unsigned long,
unsigned long)+0x40
[0x00000007c0340000 - 0x0000000800000000] committed 1045248KB from
[0x00002b96ab32655c] ReservedSpace::ReservedSpace(unsigned
long, unsigned long, bool, char*)+0xac
[0x00002b96aaea116b]
Metaspace::allocate_metaspace_compressed_klass_ptrs(char*, unsigned
char*)+0x15b
[0x00002b96aaea36bc] Metaspace::global_initialize()+0x24c
[0x00002b96ab2c589f] universe_init()+0x8f
After the fix we have:
Total: reserved=18696411KB, committed=13460639KB
- Java Heap (reserved=16437248KB, committed=12607488KB)
(mmap: reserved=16437248KB,
committed=12607488KB)
- Class (reserved=1078317KB, committed=31149KB)
and
[0x00000007c0000000 - 0x0000000800000000] reserved 1048576KB for Class from
[0x00002af96c2f66bc] ReservedSpace::ReservedSpace(unsigned long,
unsigned long, bool, char*)+0xac
[0x00002af96be7116b]
Metaspace::allocate_metaspace_compressed_klass_ptrs(char*, unsigned
char*)+0x15b
[0x00002af96be736bc] Metaspace::global_initialize()+0x24c
[0x00002af96c2959ff] universe_init()+0x8f
[0x00000007c0000000 - 0x00000007c0320000] committed 3200KB from
[0x00002af96c2efc95] commit_expanded(char*, unsigned long,
unsigned long, bool, bool)+0x25
[0x00002af96c2f0eb2] VirtualSpace::expand_by(unsigned long,
bool)+0x342
[0x00002af96be6466f] VirtualSpaceNode::expand_by(unsigned
long, unsigned long)+0x4f
[0x00002af96be653b0]
VirtualSpaceList::expand_node_by(VirtualSpaceNode*, unsigned long,
unsigned long)+0x40
I tested this with the new jtreg test and by manual inspection of the
NMT output.
Thanks,
StefanK
More information about the hotspot-runtime-dev
mailing list