VirtualSpaceNode::inc_container_count()
function defined in src/share/vm/memory/metaspace.cpp. This function was
initially added byJDK-8011268 "NPG: Free unused VirtualSpaceNodes"
<https://bugs.openjdk.java.net/browse/JDK-8011268> and now looks like
this:
void VirtualSpaceNode::inc_container_count() {
assert_lock_strong(SpaceManager::expand_lock());
_container_count++;
DEBUG_ONLY(verify_container_count();)
}
This implementation contains code which executed only in debug
build(call of verify_container_count()).
It was noticed that some tests spent a lot time is a
"DEBUG_ONLY(verify_container_count();)" code in inc_container_count().
Similar checks are exists in VirtualSpaceNode::retire(), so probably, check in inc_container_count can be removed from inc_container_count().
function defined in src/share/vm/memory/metaspace.cpp. This function was
initially added by
<https://bugs.openjdk.java.net/browse/JDK-8011268> and now looks like
this:
void VirtualSpaceNode::inc_container_count() {
assert_lock_strong(SpaceManager::expand_lock());
_container_count++;
DEBUG_ONLY(verify_container_count();)
}
This implementation contains code which executed only in debug
build(call of verify_container_count()).
It was noticed that some tests spent a lot time is a
"DEBUG_ONLY(verify_container_count();)" code in inc_container_count().
Similar checks are exists in VirtualSpaceNode::retire(), so probably, check in inc_container_count can be removed from inc_container_count().