final class jdk.jfr.internal.ShutdownHook implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: jdk.jfr.internal.ShutdownHook
super_class: java.lang.Object
{
private final jdk.jfr.internal.PlatformRecorder recorder;
descriptor: Ljdk/jfr/internal/PlatformRecorder;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
java.lang.Object tlabDummyObject;
descriptor: Ljava/lang/Object;
flags: (0x0000)
void <init>(jdk.jfr.internal.PlatformRecorder);
descriptor: (Ljdk/jfr/internal/PlatformRecorder;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield jdk.jfr.internal.ShutdownHook.recorder:Ljdk/jfr/internal/PlatformRecorder;
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/jfr/internal/ShutdownHook;
0 3 1 recorder Ljdk/jfr/internal/PlatformRecorder;
MethodParameters:
Name Flags
recorder
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield jdk.jfr.internal.ShutdownHook.tlabDummyObject:Ljava/lang/Object;
1: aload 0
getfield jdk.jfr.internal.ShutdownHook.recorder:Ljdk/jfr/internal/PlatformRecorder;
invokevirtual jdk.jfr.internal.PlatformRecorder.setInShutDown:()V
2: aload 0
getfield jdk.jfr.internal.ShutdownHook.recorder:Ljdk/jfr/internal/PlatformRecorder;
invokevirtual jdk.jfr.internal.PlatformRecorder.getRecordings:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 2
goto 6
StackMap locals: jdk.jfr.internal.ShutdownHook top java.util.Iterator
StackMap stack:
3: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.jfr.internal.PlatformRecording
astore 1
start local 1 4: aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getDumpOnExit:()Z
ifeq 6
aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getState:()Ljdk/jfr/RecordingState;
getstatic jdk.jfr.RecordingState.RUNNING:Ljdk/jfr/RecordingState;
if_acmpne 6
5: aload 0
aload 1
invokevirtual jdk.jfr.internal.ShutdownHook.dump:(Ljdk/jfr/internal/PlatformRecording;)V
end local 1 6: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
7: aload 0
getfield jdk.jfr.internal.ShutdownHook.recorder:Ljdk/jfr/internal/PlatformRecorder;
invokevirtual jdk.jfr.internal.PlatformRecorder.destroy:()V
8: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/jfr/internal/ShutdownHook;
4 6 1 recording Ljdk/jfr/internal/PlatformRecording;
private void dump(jdk.jfr.internal.PlatformRecording);
descriptor: (Ljdk/jfr/internal/PlatformRecording;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getDestination:()Ljdk/jfr/internal/WriteableUserPath;
astore 2
start local 2 1: aload 2
ifnonnull 4
2: aload 0
aload 1
invokevirtual jdk.jfr.internal.ShutdownHook.makeDumpOnExitPath:(Ljdk/jfr/internal/PlatformRecording;)Ljdk/jfr/internal/WriteableUserPath;
astore 2
3: aload 1
aload 2
invokevirtual jdk.jfr.internal.PlatformRecording.setDestination:(Ljdk/jfr/internal/WriteableUserPath;)V
4: StackMap locals: jdk.jfr.internal.WriteableUserPath
StackMap stack:
aload 2
ifnull 10
5: aload 1
ldc "Dump on exit"
invokevirtual jdk.jfr.internal.PlatformRecording.stop:(Ljava/lang/String;)Z
pop
end local 2 6: goto 10
StackMap locals: jdk.jfr.internal.ShutdownHook jdk.jfr.internal.PlatformRecording
StackMap stack: java.lang.Exception
7: pop
8: getstatic jdk.jfr.internal.LogTag.JFR:Ljdk/jfr/internal/LogTag;
getstatic jdk.jfr.internal.LogLevel.DEBUG:Ljdk/jfr/internal/LogLevel;
invokestatic jdk.jfr.internal.Logger.shouldLog:(Ljdk/jfr/internal/LogTag;Ljdk/jfr/internal/LogLevel;)Z
ifeq 10
9: getstatic jdk.jfr.internal.LogTag.JFR:Ljdk/jfr/internal/LogTag;
getstatic jdk.jfr.internal.LogLevel.DEBUG:Ljdk/jfr/internal/LogLevel;
new java.lang.StringBuilder
dup
ldc "Could not dump recording "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " on exit."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.jfr.internal.Logger.log:(Ljdk/jfr/internal/LogTag;Ljdk/jfr/internal/LogLevel;Ljava/lang/String;)V
10: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Ljdk/jfr/internal/ShutdownHook;
0 11 1 recording Ljdk/jfr/internal/PlatformRecording;
1 6 2 dest Ljdk/jfr/internal/WriteableUserPath;
Exception table:
from to target type
0 6 7 Class java.lang.Exception
MethodParameters:
Name Flags
recording
private jdk.jfr.internal.WriteableUserPath makeDumpOnExitPath(jdk.jfr.internal.PlatformRecording);
descriptor: (Ljdk/jfr/internal/PlatformRecording;)Ljdk/jfr/internal/WriteableUserPath;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getRecording:()Ljdk/jfr/Recording;
invokestatic jdk.jfr.internal.Utils.makeFilename:(Ljdk/jfr/Recording;)Ljava/lang/String;
astore 2
start local 2 1: aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getNoDestinationDumpOnExitAccessControlContext:()Ljava/security/AccessControlContext;
astore 3
start local 3 2: new jdk.jfr.internal.ShutdownHook$1
dup
aload 0
aload 1
aload 2
invokespecial jdk.jfr.internal.ShutdownHook$1.<init>:(Ljdk/jfr/internal/ShutdownHook;Ljdk/jfr/internal/PlatformRecording;Ljava/lang/String;)V
3: aload 3
4: invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
checkcast jdk.jfr.internal.WriteableUserPath
5: areturn
end local 3 end local 2 6: StackMap locals:
StackMap stack: java.security.PrivilegedActionException
astore 2
start local 2 7: aload 2
invokevirtual java.security.PrivilegedActionException.getCause:()Ljava/lang/Throwable;
astore 3
start local 3 8: aload 3
instanceof java.lang.SecurityException
ifeq 10
9: getstatic jdk.jfr.internal.LogTag.JFR:Ljdk/jfr/internal/LogTag;
getstatic jdk.jfr.internal.LogLevel.WARN:Ljdk/jfr/internal/LogLevel;
new java.lang.StringBuilder
dup
ldc "Not allowed to create dump path for recording "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getId:()J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " on exit."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.jfr.internal.Logger.log:(Ljdk/jfr/internal/LogTag;Ljdk/jfr/internal/LogLevel;Ljava/lang/String;)V
10: StackMap locals: java.security.PrivilegedActionException java.lang.Throwable
StackMap stack:
aload 3
instanceof java.io.IOException
ifeq 12
11: getstatic jdk.jfr.internal.LogTag.JFR:Ljdk/jfr/internal/LogTag;
getstatic jdk.jfr.internal.LogLevel.WARN:Ljdk/jfr/internal/LogLevel;
new java.lang.StringBuilder
dup
ldc "Could not dump "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual jdk.jfr.internal.PlatformRecording.getId:()J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc " on exit."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic jdk.jfr.internal.Logger.log:(Ljdk/jfr/internal/LogTag;Ljdk/jfr/internal/LogLevel;Ljava/lang/String;)V
12: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Ljdk/jfr/internal/ShutdownHook;
0 13 1 recording Ljdk/jfr/internal/PlatformRecording;
1 6 2 name Ljava/lang/String;
2 6 3 acc Ljava/security/AccessControlContext;
7 13 2 e Ljava/security/PrivilegedActionException;
8 13 3 t Ljava/lang/Throwable;
Exception table:
from to target type
0 5 6 Class java.security.PrivilegedActionException
MethodParameters:
Name Flags
recording
}
SourceFile: "ShutdownHook.java"
NestMembers:
jdk.jfr.internal.ShutdownHook$1 jdk.jfr.internal.ShutdownHook$ExceptionHandler
InnerClasses:
jdk.jfr.internal.ShutdownHook$1
final ExceptionHandler = jdk.jfr.internal.ShutdownHook$ExceptionHandler of jdk.jfr.internal.ShutdownHook