Stefan Haberl
Stefan Haberl

Reputation: 10539

Disable IntelliJ CPU profiler

I started my (Spring Boot) application with IntelliJ's CPU profiler:

CPU Profiler

All fine, but now, whenever I start the application (or any Unit test for that matter) without the profiler, IntelliJ's Run tab keeps telling me, that it's running with a profiler:

Run tab with CPU Profiler

I'm not sure, if IntelliJ actually does attach a profiler, because the Profile tab is empty. Is this an IntelliJ 2020.3 bug? How can I verify, that no CPU profiler is attached to my process?

Upvotes: 2

Views: 1193

Answers (1)

lealceldeiro
lealceldeiro

Reputation: 14958

When you choose 'Run <app> with CPU Profiler' if you open the "Profiler" tab in the lower tools panel, you'll see the icons for profiler running with a green dot (as active) to the left of the application name, like this (SpringApplication is the name in this case).

Notice here the texts "Profiling" ... and "Duration" ... and a "Stop Profiling..." option:

Running App with profiler

If you stop that run, you'll see in that same tab that the green dot is not there anymore and the profiling results are shown:

Profiler stopped

Now, if you run the application without a profiler (just 'Run'), you'll see something like this, which is quite misleading, because it seems the app is running in profiling mode:

App Running

But if you navigate to the "Profiler" tab again without stopping the application, you'll see that it's not started -- as it was before as in the first image posted above.

Profiler tab showing profiler deactivated

Most probably that misleading text is a bug.


Tested using:

IntelliJ IDEA 2020.3 (Ultimate Edition)
Build #IU-203.5981.155, built on December 1, 2020
Runtime version: 11.0.9+11-b1145.21 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-58-generic

Upvotes: 1

Related Questions