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

Add recommended jvm options in async profiler #156

Closed
jvican opened this issue Sep 12, 2018 · 2 comments
Closed

Add recommended jvm options in async profiler #156

jvican opened this issue Sep 12, 2018 · 2 comments

Comments

@jvican
Copy link
Member

jvican commented Sep 12, 2018

The async profiler attaches/detaches itself from the measurement iterations on demand instead of doing it on startup via a java agent. In the docs of async-profiler, this is what it recommends if this is the case:

When agent is not loaded at JVM startup (by using -agentpath option) it is highly recommended to use -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints JVM flags. Without those flags the profiler will still work correctly but results might be less accurate e.g. without -XX:+DebugNonSafepoints there is a high chance that simple inlined methods will not appear in the profile. When agent is attached at runtime CompiledMethodLoad JVMTI event enables debug info, but only for methods compiled after the event is turned on.

Should we enable these two compilation flags by default in beforeIteration?

/cc @retronym

@retronym
Copy link
Member

Yes, that looks like an oversight. I made the JFR profiler add those the forked JVM's startup. I'll try to do the same for async-profiler.

The other thing I've been meaning to do is adapt to OpenJDK support for JFR. OpenJDK 11 doesn't support the "EnableCommercialFeatures" flag or jcmd, flight recorder is available without that.

@retronym
Copy link
Member

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

No branches or pull requests

2 participants