visualvm
visualvm copied to clipboard
Cancel/Stop/Abort HeapDump operations like GC Roots or Retained Size
Is your feature request related to a problem? Please describe. Accidentally clicking on GC root or Retained Size will start a Heap-Global computation possibly taking hours on large heaps.
Describe the solution you'd like It would help to be able to cancel such an operation.
Describe alternatives you've considered Restarting VisualVM / Re-Loading the Heap also takes a lot of time
Can you please specify the VisualVM version you're using?
Version: 2.0 (Build 200217); platform 20191008-unknown-revn
System: Mac OS X (10.14.6) , x86_64 64bit
Java: 11.0.1; OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode)
Vendor: Oracle Corporation, http://java.oracle.com/
I tried, but the task list with the progressbar in the bottom status bar only has a greyed out Cancel menu entry on right-click.
You should be able to work with heap dump even if GC root or Retained Size computation is running. This is new feature - older versions of VisualVM do not have this possibility.
Yes, I am able to work while those tasks are running. But the fans of my computer are spinning quite loudly and the battery is drained for the hour or so that task runs. It also slows down the computer overall.
It would just be nice to have. The progressbar updates would be natural safe-points to check for a cancel event and discard any results and stop.
Yes, I am able to work while those tasks are running.
Ok, good to know.
But the fans of my computer are spinning quite loudly and the battery is drained for the hour or so that task runs. It also slows down the computer overall.
We are aware of it.
It would just be nice to have. The progressbar updates would be natural safe-points to check for a cancel event and discard any results and stop.
You are right. Unfortunately it is not an easy task to cancel the computation in such a way that the heap model remains in the consistent state and computation of the GC roots or Retained Size can be restarted.