RFR: 8300732: Whitebox functions for Metaspace test should use byte size [v4]
Ashutosh Mehra
asmehra at openjdk.org
Tue Nov 5 16:44:42 UTC 2024
On Wed, 30 Oct 2024 19:21:30 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:
>> Hi all,
>>
>> This PR addresses [8300732](https://bugs.openjdk.org/browse/JDK-8300732) switching Whitebox Metaspace test functions to use bytes as opposed to words.
>>
>> Testing:
>> - [x] `test/hotspot/jtreg/runtime/Metaspace` tests pass.
>>
>> Thanks,
>> Sonia
>
> 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
Marked as reviewed by asmehra (Committer).
A couple of minor things, otherwise looks good.
src/hotspot/share/prims/whitebox.cpp line 1788:
> 1786:
> 1787: WB_ENTRY(jlong, WB_RootChunkWordSize(JNIEnv* env))
> 1788: return (jlong)Metaspace::reserve_alignment_words();
indentation required
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.
-------------
PR Review: https://git.openjdk.org/jdk/pull/20039#pullrequestreview-2416168758
PR Comment: https://git.openjdk.org/jdk/pull/20039#issuecomment-2457670809
PR Review Comment: https://git.openjdk.org/jdk/pull/20039#discussion_r1829679980
PR Review Comment: https://git.openjdk.org/jdk/pull/20039#discussion_r1829679868
More information about the hotspot-dev
mailing list