Before capturing and providing the CPU snapshot, please be aware of the following known issues (and possible solutions):
If the UI of IntelliJ IDEA is unresponsive for more than 5 seconds, it starts writing thread dumps to the logs directory. If you've encountered a situation of IntelliJ IDEA unresponsiveness or deadlock, please find the threadDumps-xxx directory from the session in which you've experienced the problem and send the contents to email@example.com.
The logs directory on Windows and Linux is USERPROFILE\.IntelliJIdeaXX\system\log.
On Mac OS X, the logs directory can be found at:
for IntelliJ IDEA 8.x and older versions
for 9.0 and later IntelliJ IDEA versions
If you have a performance problem not related to the issues mentioned above, please contact firstname.lastname@example.org and provide the following information:
IntelliJ IDEA Ultimate includes a built-in YourKit profiling agent that can be used to take CPU and memory snapshots. Please use the following instructions to enable it.
Open IDEA_HOME/bin/idea.exe.vmoptions (idea.vmoptions on Linux/Solairs), add the following line at the bottom:
On Mac OS X open Info.plist located in /Applications/IntelliJ IDEA X.X.app/Contents, find the following:
<string>-Xms16m -Xmx192m -XX:MaxPermSize=120m -Xbootclasspath/p:../lib/boot.jar -ea</string>
Modify the string tag by adding -agentlib:yjpagent option, like:
<string>-Xms16m -Xmx192m -XX:MaxPermSize=120m -Xbootclasspath/p:../lib/boot.jar -ea -agentlib:yjpagent</string>
If you want to profile the slow startup of the application, CPU snapshot recording should be started automatically by using the following option instead:
Note that yjpagent library provided with IntelliJ IDEA 9 or earlier will not work on 64-bit operating system when you run IntelliJ IDEA under 64-bit JVM. If you can't run under 32-bit JVM, please obtain the 64-bit library version from the YourKit Java Profiler distribution (you need Linux .zip download of 7.5 or 8.x version containing library versions for different operating systems: Linux, Mac, Solaris, Windows). Replace yjpagent library in IDEA_HOME\bin with the appropriate version. Use 8.x YourKit version with IntelliJ IDEA 9.x and 7.5 version with previous IntelliJ IDEA versions. IntelliJ IDEA 10 and later has both 32-bit and 64-bit libraries bundled, therefore this step is not required.
For the 64-bit JVMs -agentlib:yjpagent64 option needs to be used instead or the IDE will not start.
Start IntelliJ IDEA and you should notice 2 new buttons in the toolbar, one for taking CPU snapshot, another one for Memory snapshot. You may need to enable View | Toolbar to access the buttons, or use Tools menu actions instead. Press the CPU button and perform the actions which take a lot of CPU resources on your machine. When finished, press this button again to stop recording, save the snapshot and upload it to ftp://ftp.intellij.net/.uploads/ (please note that listing is not allowed in this directory, only upload is permitted, therefore you will not be able to see/download your and other files there, some FTP clients may not like it, also be sure to switch into the binary transfer mode if uploading via commnad line ftp client). If you can't access FTP, use some free file sharing service and send us a link.
Send us an e-mail with the file name and we'll investigate the issue. In the e-mail please also describe what you were doing in detail. If you can reproduce it in a small project, please provide one. You can also submit an issue to YouTrack instead of contacting us by mail.
IntelliJ IDEA Community Edition does not include a YourKit profiling agent, because the YourKit agent library is not open-source. To take a CPU or memory snapshot with IntelliJ IDEA Community Edition, you can download an evaluation version of YourKit Java Profiler, copy the yjpagent library to the IntelliJ IDEA binary directory, add it to the VM options as described above, and connect to the running IntelliJ IDEA instance from the standalone YourKit Profiler UI.
In case of memory related issues (memory usage goes high, garbage is not collected, etc) please use the Memory snapshot button in the menu near the CPU snapshot button. If it's not possible to get the snapshot because of the application crashing with OutOfMemory errors, please add the
option to the IntelliJ IDEA JVM options. On the next OOM error the .hrpof dump will be produced and saved by the JVM (usually in the application working directory which is IDEA_HOME\bin). Upload this dump to our FTP as described above in the CPU snapshot section.
Please note that memory snapshot may contain the sensitive source code from your project. If you are uploading to a public service, use some password protection or enctyption. JetBrains FTP server is write only and you don't need to protect files uploaded there.