Sampling PGO support #7648
-
Hi! According to the GraalVM documentation, GraalVM supports PGO only with Instrumentation. However, other AoT compilers like Clang, GCC, Rustc support an additional PGO kind - Sampling PGO (also called AutoFDO). Is there a way to use anyhow sampling PGO with GraalVM? If not, are there plans for implementing sampling PGO in GraalVM? Having sampling PGO support is important for many PGO-in-production scenarios, especially if we are talking about using PGO at large scales. More about this topic you can find in Google's paper: https://research.google/pubs/pub45290/ Links: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, the PGO in GraalVM EE does both instrumentation and sampling in the last two releases. We will improve our official documentation to explain this better. |
Beta Was this translation helpful? Give feedback.
Yes, the PGO in GraalVM EE does both instrumentation and sampling in the last two releases.
The call-stack samples are included in the
.iprof
files next to the instrumentation profiles.On nightlies (didn't check if it made it to the last release), there is an option
-H:+BuildReport -H:+BuildReportSamplerFlamegraph
that will render these samples inside the build report file (so that they can be inspected visually in a flame graph).The samples are used to improve some of the EE optimizations.
We will improve our official documentation to explain this better.