On Mon, 2 Nov 2026 16:08:09 GMT, jonghoonpark <[email protected]> wrote:

>> When C2 scalar-replaces a Vector API object, its payload is recorded in 
>> debug info as a `Location::vector`. SA's `Location.getType()` does not 
>> recognize this type and throws "should not reach here" when it decodes such 
>> a location.
>> 
>> The cause is that `vmStructs` does not export HotSpot's `Location::vector`, 
>> and SA's `Location` has no corresponding type.
>> 
>> ## Changes
>> - `vmStructs.cpp`: export `Location::vector`
>> - SA `Location.java`: add `Type.VECTOR` and handle it in `getType()`, 
>> `Type.getValue()` and `printOn()`
>> - `HTMLGenerator.java`: handle `VECTOR` in `locationAsString()`
>> 
>> ## Testing
>> - New test `serviceability/sa/TestVectorDebugInfoDecode.java`: runs a 
>> `LingeredApp` that waits with a C2-compiled frame on its stack, holding a 
>> live `IntVector` across a call. The test attaches SA and checks that a 
>> `Location` of type `vector` is decoded from that frame's scope objects.
>>   - Without the fix, the test fails:
>>     - With none of the changes, it does not compile because 
>> `Location.Type.VECTOR` does not exist.
>>     - With only the `getType()` branch removed, it fails with the same 
>> "should not reach here" as in the bug report.
>> - `tier1` tests pass.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> jonghoonpark has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   add outputs in test
>   
>   Signed-off-by: jonghoonpark <[email protected]>

Looks good.

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

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/33665#pullrequestreview-5741048787

Reply via email to