Is it possible to profile the performance of coroutines using VisualVM? If it can be done how would the coroutines be profiled? I'm mainly interested in memory usage as I ended up with a bit of a scare the other day when the JVM crashed due to running out of memory. Noticed when running VisualVM that the profiled JVM program is using many threads which is concerning considering that the program only uses coroutines. Was expecting the thread count to average around 5 with the total CPU cores mainly affecting the thread count. Actual thread count is averaging around 29.
04/22/2020, 2:51 AM
somewhat, the coroutines will not have proper stacktraces due to how it's implemented, but all of the code will show up somewhere in the profiler, assuming you use profiling and not snapshots
04/22/2020, 2:55 AM
What are the differences between profiling, and snapshots? This is my first time profiling a JVM program.