RFR: 8300732: Whitebox functions for Metaspace test should use byte size [v4]

Thomas Stuefe stuefe at openjdk.org
Tue Nov 5 16:56:33 UTC 2024


On Tue, 5 Nov 2024 16:41:23 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> Sonia Zaldana Calles has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>> 
>>  - Merge branch 'master' of github.com:openjdk/jdk into JDK-8300732
>>  - Feedback - updating Unit.valueOf to direct access
>>  - Hard coding values and adding Unit class
>>  - whitebox changes based on feedback. Using is_aligned and asserts
>>  - 8300732: Whitebox functions for Metaspace test should use byte size
>
> test/hotspot/jtreg/runtime/Metaspace/elastic/TestMetaspaceAllocationMT1.java line 109:
> 
>> 107: 
>> 108:             // Note: reserve limit must be a multiple of Metaspace::reserve_alignment_words()
>> 109:             //  (512K on 64bit, 1M on 32bit)
> 
> Are these figures still valid?
> IIUC Metaspace::reserve_alignment_words() is 16M on 32-bit and 64M on 64-bit.

No, it should be 16MB for both 32- and 64-bit (one metaspace root chunk size). The virtual space node default size is 16/64MB, but it needs not to be aligned at that.

But the comment is still obsolete. It cites the number of words needed for the old root chunk size of 4MB. So its obsolete on two accounts. I think it should just say "(16 MB)"

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20039#discussion_r1829698239


More information about the hotspot-dev mailing list