[10] RFR(S): 8087339: The code heap might use different alignment for committed size and reserved size

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Nov 22 20:23:49 UTC 2017



On 11/22/17 5:51 AM, Tobias Hartmann wrote:
> Hi,
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8087339
> http://cr.openjdk.java.net/~thartmann/8087339/webrev.00/
> The alignment of the code cache is determined in CodeCache::reserve_heap_memory() by computing the minimum of the page
> size for the ReservedCodeCacheSize and the InitialCodeCacheSize (which is usually very small and not aligned to the
> large page size). As a result, when using large pages (by enabling UseTransparentHugePages or UseHugeTLBFS), the
> ReservedSpace is only backed by large pages if the InitialCodeCacheSize is large page aligned as well.
> I've changed the implementation to not consider InitialCodeCacheSize and re-factored the code to use
> CodeCache::page_size() both for the alignment of heap sizes as well as the alignment of the entire reserved space.
> I've verified that this sets the correct alignment on my machine when using 2048K pages instead of 4K pages.
> Thanks,
> Tobias

More information about the hotspot-compiler-dev mailing list