> 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]> ------------- Changes: - all: https://git.openjdk.org/jdk/pull/33665/files - new: https://git.openjdk.org/jdk/pull/33665/files/104a1282..95d5ae71 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=33665&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33665&range=00-01 Stats: 13 lines in 1 file changed: 11 ins; 1 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/33665.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33665/head:pull/33665 PR: https://git.openjdk.org/jdk/pull/33665
