Skip to content

Add Profile-Guided Optimization (PGO) support to dart2native #53855

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

Open
zamazan4ik opened this issue Oct 25, 2023 · 2 comments
Open

Add Profile-Guided Optimization (PGO) support to dart2native #53855

zamazan4ik opened this issue Oct 25, 2023 · 2 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P3 A lower priority bug or feature request triaged Issue has been triaged by sub team type-enhancement A request for a change that isn't a bug

Comments

@zamazan4ik
Copy link

zamazan4ik commented Oct 25, 2023

Hi!

Recently I started to evaluate the Profile-Guided Optimization (PGO) state across the whole ecosystem. I did a lot of PGO measurements - all the results are available here. According to my experience, PGO helps with achieving better optimization levels in many real-world applications. That's why I think having PGO support for compiling Dart programs with dart2native is a nice feature to have.

Multiple languages already support PGO like:

  • C, C++, Fortran (in Clang, GCC, MSVC, ICC)
  • Rust (Rustc)
  • Go (was recently added in the 1.21 release)
  • Java (via GraalVM)
  • C#

Also, adding PGO to dart2native was already previously mentioned in #39367 - I just decided to create a dedicated issue for it.

@lrhn lrhn added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Oct 25, 2023
@mkustermann
Copy link
Member

Also, adding PGO to dart2native was already previously mentioned in #39367 - I just decided to create a dedicated issue for it.

@zamazan4ik Thank you for filing the issue about PGO. Any reason we need 2 different github issues for this? Also notice that dart2native (aka dart compile exe/aot-snapshot) is not the only way to invoke our AOT compiler (e.g. flutter build also does invoke it). Maybe we can close this in favor of #53856?

@zamazan4ik
Copy link
Author

Any reason we need 2 different github issues for this?

Yeah, I will explain it. #53855 is about adding a possibility to compile Dart programs with PGO using dart2native (also, as you mentioned above flutter build and probably other AoT compiler invocations). #53856 is about compiling with PGO and BOLT the DartVM itself (which is written in C++). So these are two different issues.

@a-siva a-siva added type-enhancement A request for a change that isn't a bug P3 A lower priority bug or feature request triaged Issue has been triaged by sub team labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. P3 A lower priority bug or feature request triaged Issue has been triaged by sub team type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants