Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

@graalvmbot graalvmbot commented Nov 15, 2023

For instance objects, it makes sense to move the identity hashcode from the object header into the object. If there are any gaps in the object layout, the identity hashcode can be placed in such a gap, which decreases memory usage. If there are no gaps, the identity hashcode is appended to the object, resulting in the same memory usage as before. So, this PR strictly reduces memory usage.

As a side effect, it is more likely that the Native Image field offsets are different from the offsets used by HotSpot. This makes it easier to diagnose and debug when a field offset computed at image build time is wrongly used at image run time.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 15, 2023
@zakkak
Copy link
Collaborator

zakkak commented Nov 16, 2023

Hello @christianhaeubl, could you please update the description of the PR to include the justification for the change? Thank you.

@graalvmbot graalvmbot force-pushed the chaeubl/GR-48949 branch 2 times, most recently from c45fa41 to 7b953b9 Compare November 17, 2023 18:25
@adinn
Copy link
Collaborator

adinn commented Nov 20, 2023

@christianhaeubl Does this patch require any updates to the debuginfo documentation?

@christianhaeubl
Copy link
Member

@adinn : good point, I adjusted the documentation accordingly.

Copy link
Collaborator

@adinn adinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug info changes look good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants