提交 71bae2e0 编写于 作者: C coleenp

8027616: Off by one error in putback for compressed oops nashorn performance improvement

Summary: Should compare bounds greater than or equal 4G when deciding if shift is needed or CDS area + compressed class space are within 4G of each other.
Reviewed-by: stefank, hseigel, zgu
上级 64a13e1b
......@@ -2869,7 +2869,7 @@ void Metaspace::set_narrow_klass_base_and_shift(address metaspace_base, address
Universe::set_narrow_klass_base(lower_base);
if ((uint64_t)(higher_address - lower_base) < UnscaledClassSpaceMax) {
if ((uint64_t)(higher_address - lower_base) <= UnscaledClassSpaceMax) {
Universe::set_narrow_klass_shift(0);
} else {
assert(!UseSharedSpaces, "Cannot shift with UseSharedSpaces");
......@@ -2885,7 +2885,7 @@ bool Metaspace::can_use_cds_with_metaspace_addr(char* metaspace_base, address cd
address lower_base = MIN2((address)metaspace_base, cds_base);
address higher_address = MAX2((address)(cds_base + FileMapInfo::shared_spaces_size()),
(address)(metaspace_base + compressed_class_space_size()));
return ((uint64_t)(higher_address - lower_base) < UnscaledClassSpaceMax);
return ((uint64_t)(higher_address - lower_base) <= UnscaledClassSpaceMax);
}
// Try to allocate the metaspace at the requested addr.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册