What is shutdown snapshot?

Questions about YourKit Java Profiler
Post Reply
igor.rudyak
Posts: 3
Joined: Thu Dec 28, 2017 8:41 pm

What is shutdown snapshot?

Post by igor.rudyak »

I have such YourKit triggers specified:

Code: Select all

TimerListener delay=0ms maxTriggerCount=1
  EnableExceptionTelemetry
  EnableStackTelemetry
  StartAllocationRecording sizeLimit=4096 recordEach=10 sampledAllocationRecording=false
  StartCPUTracing
  StartMonitorProfiling
TimerListener delay=5m maxTriggerCount=1
  CapturePerformanceSnapshot fileName={date}-{pid}
  StopCPUProfiling
  StopAllocationRecording
  StopMonitorProfiling
  DisableExceptionTelemetry
  DisableStackTelemetry
JVMExitListener maxTriggerCount=1
  CapturePerformanceSnapshot fileName={date}-{pid}-exit
Thus I am expecting that after 5 minutes it will be created performance snapshot and at the JVM exit it should be created another snapshot.

However, in addition to two mentioned snapshots from time to time I see some strange snapshots named like {date}-{pid}-shutdown.snapshot which are rather big (like 815MB).

What's the idea of these shutdown snapshots?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: What is shutdown snapshot?

Post by Anton Katilin »

Did you try opening that snapshot? Perhaps it's a memory snapshot which is automatically captured on exit because object allocation recording is still running at the moment. If this is the case, it is not related with your trigger (i.e. it would be captured even if there was no JVMExitListener). Please see description of "onexit=memory" and "onexit=snapshot" at https://www.yourkit.com/docs/java/help/ ... ptions.jsp

Try using

StopCPUProfiling
StopAllocationRecording
StopMonitorProfiling

in the JVMExitListener trigger to ensure no automatic on-exit snapshot is captured.
igor.rudyak
Posts: 3
Joined: Thu Dec 28, 2017 8:41 pm

Re: What is shutdown snapshot?

Post by igor.rudyak »

Yes, it's memory snapshot. Thanks for the clarification.
igor.rudyak
Posts: 3
Joined: Thu Dec 28, 2017 8:41 pm

Re: What is shutdown snapshot?

Post by igor.rudyak »

Even after these options were added to JVMExitListener:

StopCPUProfiling
StopAllocationRecording
StopMonitorProfiling

it still creates shutdown snapshot.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: What is shutdown snapshot?

Post by Anton Katilin »

Hi,

It seems we've found why Stop* actions in the exit trigger do not affect the "...-shutdown" snapshot.

Could you please contact [email protected]
We'll provide you with a test build to ensure the proposed fix works.

Best regards,
Anton
Post Reply