Monitor thread creation/destruction

Questions about YourKit Java Profiler
Post Reply
eric.beard.medhost
Posts: 1
Joined: Thu Jun 14, 2018 2:10 am

Monitor thread creation/destruction

Post by eric.beard.medhost »

Is there a way to log who created each thread and how long it lived? I don't want to take multiple hprofs and try to analyze them. There are 10s of thousands of threads getting created and destroyed and I need to know who is responsible for creating them. I'd like to monitor for 10-15 minutes and get a list of all the threads created/destroyed, their lifetime, and creator (preferably with the creating class).

Thanks
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Monitor thread creation/destruction

Post by Anton Katilin »

In the "Events" tab switch to "Events by Table" and select the "Thread" table in the tree:
https://www.yourkit.com/docs/java/help/probes_ui.jsp

This information is available in live view and in a performance snapshot, i.e. it is not needed to capture a memory snapshot to investigate thread life cycle.
Post Reply