- Capture CPU usage snapshot of slow startup
- Enabling Profiler Agent
- Capturing Snapshots
- Upload snapshot
Capture CPU usage snapshot of slow startup
To profile slow startup by automatically enabling CPU snapshot recording right after IDE is started, please use the sampling option:
Adjust this line depending on the OS. Please check the Enabling Profiler Agent section above. You just need to replace delay=10000 option with the sampling option and make sure NOT to specify the probe_disable=* option.
CPU snapshot file will be saved automatically into your HOME directory with the .snapshot extension after your close the IDE.
CPU snapshot file will be saved automatically after you close the IDE into your HOME/snapshots directory with the .snapshot extension.
Enabling Profiler Agent
Profiler agent is enabled by default in EAP builds, to enable it in the release builds do the following:
- Help | Edit Custom VM Options
- At the end of the .vmoptions file add the following line:
Linux with 2017.3 or lower product version
After restarting the IDE you should see two new items under the Tools menu: Start CPU Usage Profiling and Capture Memory Snapshot.
To provide an informative CPU snapshot you should click on Start CPU Usage Profiling and then perform the actions which are causing performance problems, try to reproduce the performance problem several times while the snapshot is being recorded, then click on the Tools | Stop CPU Usage Profiling to save the snapshot file (snapshot is saved in the user home directory and IDE will show a notification with the exact file name, the extension of the file is .zip). If you don't see a notification and can't find the snapshot file, please check that notifications are enabled for the Profiler.
When reporting the problem, please make sure to describe what you were doing in detail.
CPU SNAPSHOT WITH INVOCATION COUNTS
When asked to provide a snapshot with the invocation counts, in addition to the -agentlib... option please also add the following into the .vmoptions file:
Make sure there is no disabletracing option in the -agentlib... line, use the options string from the Enabling Profiling Agent section of this document.
Restart your IDE and capture the CPU snapshot from the Tools menu or using the toolbar button.
If the problem you are reporting is related to the heavy memory usage and frequent garbage collection, use the Capture Memory Snapshot menu item. To capture automatic memory snapshots when IDE runs out of memory, add
into .vmoptions file. A dump file (.hprof) will be created in the current working directory of the application (<Rider Installation Folder>/bin). In case this directory is read-only, add
option to change it. See Oracle documentation for more details.
Please note, that memory snapshot may contain the sensitive source code from your project.