> Value Object has been introduced since JDK 28 (as a preview feature), however 
> it cannot be handled in SA.
> 
> 
> public value class Test{
> 
>   public static value record Rec(byte recA, byte recB){};
> 
>   byte a;
> 
>   byte b;
> 
>   Rec rec;
> 
>   byte c;
> }
> 
> 
> `rec` as `Test$Rec` can be inlined into the instance of `Test`, but it would 
> be shown as "Bad OOP" in "inspect" on SA. SA should show valid values in 
> `rec`.
> 
> Note that his change would expand flattened object in below in `inspect` 
> CLHSDB command:
> 
> 
> hsdb> inspect 0xc22419e8
> instance of Oop for LingeredAppWithValueObject$ValueObj @ 0x00000000c22419e8 
> (size = 16)
> _mark: 73201086130815105
> a: 1
> b: 2
> rec:
>   recA: 10
>   recB: 20
> c: 3
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Yasumasa Suenaga has updated the pull request incrementally with one additional 
commit since the last revision:

  Update 
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InlineKlass.java
  
  Co-authored-by: Chris Plummer <[email protected]>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/32310/files
  - new: https://git.openjdk.org/jdk/pull/32310/files/ef641e2b..daff22b9

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=32310&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32310&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/32310.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/32310/head:pull/32310

PR: https://git.openjdk.org/jdk/pull/32310

Reply via email to