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

[GR-38835] native-image performance regression when using debug-info generation #4595

Closed
olpaw opened this issue May 24, 2022 · 4 comments · Fixed by #4597
Closed

[GR-38835] native-image performance regression when using debug-info generation #4595

olpaw opened this issue May 24, 2022 · 4 comments · Fixed by #4597
Assignees
Milestone

Comments

@olpaw
Copy link
Member

olpaw commented May 24, 2022

Merging of #4505 introduced a native-image performance regression when images are built with debug-info. Using -g should not have an affect on the performance of the image that gets built.

@olpaw olpaw self-assigned this May 24, 2022
@olpaw olpaw added this to the 22.2 milestone May 24, 2022
@olpaw olpaw changed the title native-image performance regression when using debug-info generation [GR-38835] native-image performance regression when using debug-info generation May 25, 2022
@adinn
Copy link
Collaborator

adinn commented May 25, 2022

@olpaw Hi Paul. Can you just clarify a few things here.

  1. I am not 100% clear sure I believe you are saying that the problem here is not that enabling full infopoints implies longer build times, rather that it is causing a slow-down in execution time for the generated mage. Is that correct?
  2. Can you give any indication of how much much of a slowdown you were able to measure (also, if you can, how that varied according to what the test app was doing)
  3. Do you know why enabling full infopoints causes this slowdown?

I ask because I think it is a very important goal to have full debuginfo, based on full infopoints, as the default when generating an image for deployment. Given that this change disables full infopoints for optimization levels O1 and O2 (O2 being the default) it prejudices that goal.

The reason for pursuing that goal is that it makes it a lot easier to deal with the, hopefully very rare circumstance that an issue in the GraalVM Native chain manifests in a deployed app. It avoids the need to rebuild the app with full infopoint generation enforced in order to best be able to debug it; and it bypasses the possibility that the problem fails to manifest in the rebuilt version. I'd really like to recommend Mandrel users to configure final builds of images for deployment so that they enforce full infopoint generation.

Obviously, it is important to know what the other side of the equation is here: i.e. what it might cost in deployment time performance if we were to recommend to a user to force full infopoints. So, any info you have on that cost would be helpful to know.

@olpaw
Copy link
Member Author

olpaw commented May 25, 2022

@adinn enabling full infopoints cause performance regressions in the runtime of images. (Of course debug info generation time also increased due to debug location info generation but this is not the concern here.)

@farquet provided me with the numbers:
image
He might be able to provide more pointer to the actual benchmarks results.

Full infopoints keep locals alive beyond the point they would otherwise be the end of their live-range. This has a negative impact on optimizations.

@adinn
Copy link
Collaborator

adinn commented May 25, 2022

@olpaw Thanks for providing those figures. That's definitely a significant regression :-(

@farquet
Copy link
Member

farquet commented May 25, 2022

Benchmark numbers are public: https://graal.d3s.mff.cuni.cz/see/overview

You can browse individual performance regressions/speedups and it will tell you more about the JVM configuration, the absolute scores, candidate culprit commits, hardware info, etc

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

Successfully merging a pull request may close this issue.

3 participants