JDK-8300732 : Whitebox functions for Metaspace test should use byte size
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17,20,21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-01-20
  • Updated: 2024-07-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24Unresolved
Related Reports
Relates :  
Description
All WB functions pertaining to elastic metaspace that take sizes take those in number-of-words. 

`WB_CreateMetaspaceTestContext`, 
`WB_AllocateFromMetaspaceTestArena`, `WB_DeallocateToMetaspaceTestArena`,
`WB_GetTotalCommittedWordsInMetaspaceTestContext`, `WB_GetTotalUsedWordsInMetaspaceTestContext`
 and
`WB_GetMaxMetaspaceAllocationSize`. 

This is unwieldy, and since the tests using them (test/hotspot/jtreg/runtime/Metaspace/elastic/Settings.java) implicitly assume 8 as word size, slightly wrong for 32-bit.

The error is benign since these sizes are applied consistently. But it makes maintenance difficult.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20039 Date: 2024-07-04 15:18:29 +0000
09-07-2024