Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better way to avoid unused fields being dead-code eliminated #8746

Open
galderz opened this issue Apr 11, 2024 · 2 comments
Open

Better way to avoid unused fields being dead-code eliminated #8746

galderz opened this issue Apr 11, 2024 · 2 comments
Labels

Comments

@galderz
Copy link
Contributor

galderz commented Apr 11, 2024

Foivos recently realised that padding fields added to classes get dead-code eliminated in native image.

Performance sensitive code often relies in tricks like that to avoid fail sharing. For native image, one could add register those fields for reflection access, but that's a fairly expensive thing to do in terms of build times, native executable size...etc. It would be nice to have a way to register fields such that they don't get dead-code eliminated.

@galderz
Copy link
Contributor Author

galderz commented Apr 11, 2024

To paraphrase @zakkak, something akin to query* but opposite.

@franz1981
Copy link

The thing is: it really matter? false sharing is a problem for high concurrent and high thoughput contended uses cases: sometime is just not worthy and having smaller dataset is better, so...let's think about it where it happens...and I can help to detect the hot spots, see netty/netty#12496 and netty/netty#13945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants