RFR (S): 8025228: assert(new_entry->reserved_words() == vs_word_size) fails in nightly

Thomas Schatzl thomas.schatzl at oracle.com
Tue Sep 24 05:02:53 PDT 2013


Hi,

On Tue, 2013-09-24 at 13:32 +0200, Bengt Rutisson wrote:
> 
> Hi everyone,
> 
> Could I have a couple of reviews for this change?
> 
> http://cr.openjdk.java.net/~brutisso/8025228/webrev.00/
> 
> https://bugs.openjdk.java.net/browse/JDK-8025228
> 
> We hit this assert in VirtualSpaceList::get_new_chunk() when we have
> an allocation that is larger than VirtualSpaceSize and that is not
> aligned with vm_allocation_granularity. The reason is that the
> VirtualSpace will grow with sizes aligned to vm_allocation_granularity
> but we we only guarantee that the sizes we want to grow with are page
> aligned. This means that we only hit this assert on platforms
> (Windows) where vm_allocation_granularity > vm_page_size.
> 
> Since VirtualSpaceSize is vm_allocation_granularity aligned on all
> platforms we only hit the assert for allocations larger than that size
> due to this line:
> 
> 1224           size_t grow_vs_words =
> 1225             MAX2((size_t)VirtualSpaceSize,
> aligned_expand_vs_by_words);
> 
> The fix is to make sure that the grow_vs_words value is
> vm_allocation_granularity aligned and not just page size aligned.

The change looks fine by me, but I am no expert in that area.
> 
> Testing:
> 
> Added a unit test that fails this way on Windows before my fix:
> 
> Running internal VM tests
> Running test: TestReservedSpace_test()
> Running test: TestReserveMemorySpecial_test()
> Running test: TestVirtualSpace_test()
> Running test: MetaspaceAux_test()

Because it is somewhat fitting to this particular issue, could you
rename "MetaspaceAux_test" to "TestMetaspaceAux_test" similar to the
others?

Thanks,
  Thomas




More information about the hotspot-gc-dev mailing list