23 comments
Comment actions Permalink

Does it work for 2019.1 EAP (with JDK 11) ? Run with "Async Profiler" option is always disabled even if we enabled the experimental option?

1
Comment actions Permalink

Note that it's for Mac and Linux only at the moment, Windows is not supported.

0
Comment actions Permalink

Sorry forgot to mention, i am running on Mac. 

IntelliJ IDEA 2019.1.1 Preview (Ultimate Edition)
Build #IU-191.6707.7, built on April 2, 2019
Subscription is active until November 3, 2019
JRE: 11.0.2+9-b159.34 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

The profile option is still disabled.

1
Comment actions Permalink

Did you add the configuration for the profiler using the + button in Preferences | Build, Execution, Deployment | Java Profiler?

5
Comment actions Permalink

Thanks, that did the trick. Profiler is working now.

0
Comment actions Permalink

Works for me. Thanks!

0
Comment actions Permalink

@Serge Baranov, I believe help page should be updated with this info

1
Comment actions Permalink

The documentation still hasn't been updated. Could it be fixed?

0
Comment actions Permalink

Sorry for the delay, we are working on it.

0
Comment actions Permalink

What's the current feeling on whether Windows can be supported?

Not looking for promises or timescales -- just want to get a sense of feasibility.

0
Comment actions Permalink

It's already supported on Windows. Please try 2019.2 EAP: https://www.jetbrains.com/idea/nextversion/

1
Comment actions Permalink

I see yes, I was looking for async profiler, but the Java Flight Recorder profiler does most of what I need in 2019.2 EAP. Given a JDK 11 project it's extremely easy to add custom events, I had them presenting in the Intellij event list, nicely categorized with durations, with a few minutes work.

Out of curiosity, would the async profiler (or some equivalent) for showing the native execution stack be feasible on Windows, too, eventually? https://blog.jetbrains.com/idea/2019/06/intellij-idea-2019-2-eap-4-profiling-tools-structural-search-preview-and-more/ says that particular profiler is Linux / Mac OSX only.

0
Comment actions Permalink

There is related request on "Async Profiler" tracker: https://github.com/jvm-profiling-tools/async-profiler/issues/188. Please follow it for updates.

0
Comment actions Permalink

@Yaroslav Are you sure about this? "It's already supported on Windows. Please try 2019.2 EAP: https://www.jetbrains.com/idea/nextversion/"?

 

I just downloaded the newest version for Windows (2019.3) and still don't see JVM Profiler support for Windows.

0
Comment actions Permalink

Async Profiler is not available for Windows at the moment, but the Java Flight Recorder is available for all the platforms.

0
Comment actions Permalink

I tried running the profiler with FlightRecorder but it gives the 

"C:\Program Files\Java\jdk1.8.0_152\bin\java.exe" -XX:+FlightRecorder "-XX:StartFlightRecording=name=\"CalculateService 2019_07_28_111500\",settings=\"default\",dumponexit=true,filename=\"C:\Users\Kedar\AppData\Local\Temp\javaFlightRecorder2.jfr\"" -XX:FlightRecorderOptions=stackdepth=2048 "-javaagent:F:\Program Files\JetBrains\IntelliJ IDEA 2019.1.3\lib\idea_rt.jar=50353:F:\Program Files\JetBrains\IntelliJ IDEA 2019.1.3\bin" -Dfile.encoding=UTF-8 -classpath ....<excluded here by me>

com.fitg.services.service.CalculateService
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error: To use 'FlightRecorder', first unlock using -XX:+UnlockCommercialFeatures.

 

and the profiler error Dump file is empty. 

I am using JDK 8 

0
Comment actions Permalink

Java Flight Recorder was an Oracle commercial feature before OpenJDK 11

0
Comment actions Permalink

Then this should have been actually documented somewhere with the profiler feature. Most of places are still using jdk8 so not sure if this is upgraded to 2019.2 is useful for that

0
Comment actions Permalink

Probably better to raise a bug report I'd you think the profiler feature should advise on this.

Personally, I think the best solution is to upgrade to OpenJDK 11 ;)

0
Comment actions Permalink

Add -XX:+UnlockCommercialFeatures in the VM Options field of the run/debug configuration or use OpenJDK 11+.

0
Comment actions Permalink

In case someone is stuck on this, it's always possible to Run > Attach Profiler to Process...

0

Please sign in to leave a comment.