final class jdk.jfr.internal.tool.Assemble extends jdk.jfr.internal.tool.Command
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: jdk.jfr.internal.tool.Assemble
super_class: jdk.jfr.internal.tool.Command
{
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial jdk.jfr.internal.tool.Command.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/jfr/internal/tool/Assemble;
public java.lang.String getName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc "assemble"
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/jfr/internal/tool/Assemble;
public java.util.List<java.lang.String> getOptionSyntax();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc "<repository> <file>"
invokestatic java.util.Collections.singletonList:(Ljava/lang/Object;)Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/jfr/internal/tool/Assemble;
Signature: ()Ljava/util/List<Ljava/lang/String;>;
public java.lang.String getDescription();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc "Assemble leftover chunks from a disk repository into a recording file"
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/jfr/internal/tool/Assemble;
public void displayOptionUsage(java.io.PrintStream);
descriptor: (Ljava/io/PrintStream;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ldc " <repository> Directory where the repository is located"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
1: aload 1
invokevirtual java.io.PrintStream.println:()V
2: aload 1
ldc " <file> Name of the recording file (.jfr) to create"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/jfr/internal/tool/Assemble;
0 4 1 stream Ljava/io/PrintStream;
MethodParameters:
Name Flags
stream
public void execute(java.util.Deque<java.lang.String>);
descriptor: (Ljava/util/Deque;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=8, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_2
invokevirtual jdk.jfr.internal.tool.Assemble.ensureMinArgumentCount:(Ljava/util/Deque;I)V
1: aload 0
aload 1
iconst_2
invokevirtual jdk.jfr.internal.tool.Assemble.ensureMaxArgumentCount:(Ljava/util/Deque;I)V
2: aload 0
aload 1
invokeinterface java.util.Deque.pop:()Ljava/lang/Object;
checkcast java.lang.String
invokevirtual jdk.jfr.internal.tool.Assemble.getDirectory:(Ljava/lang/String;)Ljava/nio/file/Path;
astore 2
start local 2 3: aload 1
invokeinterface java.util.Deque.pop:()Ljava/lang/Object;
checkcast java.lang.String
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
astore 3
start local 3 4: aload 0
aload 3
invokevirtual jdk.jfr.internal.tool.Assemble.ensureFileDoesNotExist:(Ljava/nio/file/Path;)Ljava/nio/file/Path;
pop
5: aload 0
aload 3
invokevirtual jdk.jfr.internal.tool.Assemble.ensureJFRFile:(Ljava/nio/file/Path;)V
6: aconst_null
astore 4
aconst_null
astore 5
7: new java.io.FileOutputStream
dup
aload 3
invokeinterface java.nio.file.Path.toFile:()Ljava/io/File;
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
astore 6
start local 6 8: aload 0
aload 2
invokevirtual jdk.jfr.internal.tool.Assemble.listJFRFiles:(Ljava/nio/file/Path;)Ljava/util/List;
astore 7
start local 7 9: aload 7
invokeinterface java.util.List.isEmpty:()Z
ifeq 11
10: new jdk.jfr.internal.tool.UserDataException
dup
new java.lang.StringBuilder
dup
ldc "no *.jfr files found at "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial jdk.jfr.internal.tool.UserDataException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals: jdk.jfr.internal.tool.Assemble java.util.Deque java.nio.file.Path java.nio.file.Path java.lang.Throwable java.lang.Throwable java.io.FileOutputStream java.util.List
StackMap stack:
aload 0
invokevirtual jdk.jfr.internal.tool.Assemble.println:()V
12: aload 0
ldc "Assembling files... "
invokevirtual jdk.jfr.internal.tool.Assemble.println:(Ljava/lang/String;)V
13: aload 0
invokevirtual jdk.jfr.internal.tool.Assemble.println:()V
14: aload 0
aload 7
aload 3
aload 6
invokevirtual java.io.FileOutputStream.getChannel:()Ljava/nio/channels/FileChannel;
invokevirtual jdk.jfr.internal.tool.Assemble.transferTo:(Ljava/util/List;Ljava/nio/file/Path;Ljava/nio/channels/FileChannel;)V
15: aload 0
invokevirtual jdk.jfr.internal.tool.Assemble.println:()V
16: aload 0
ldc "Finished."
invokevirtual jdk.jfr.internal.tool.Assemble.println:(Ljava/lang/String;)V
end local 7 17: aload 6
ifnull 25
aload 6
invokevirtual java.io.FileOutputStream.close:()V
goto 25
StackMap locals: jdk.jfr.internal.tool.Assemble java.util.Deque java.nio.file.Path java.nio.file.Path java.lang.Throwable java.lang.Throwable java.io.FileOutputStream
StackMap stack: java.lang.Throwable
18: astore 4
aload 6
ifnull 19
aload 6
invokevirtual java.io.FileOutputStream.close:()V
end local 6 StackMap locals:
StackMap stack:
19: aload 4
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
20: astore 5
aload 4
ifnonnull 21
aload 5
astore 4
goto 22
StackMap locals:
StackMap stack:
21: aload 4
aload 5
if_acmpeq 22
aload 4
aload 5
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
22: aload 4
athrow
StackMap locals: jdk.jfr.internal.tool.Assemble java.util.Deque java.nio.file.Path java.nio.file.Path
StackMap stack: java.io.IOException
23: astore 4
start local 4 24: new jdk.jfr.internal.tool.UserDataException
dup
new java.lang.StringBuilder
dup
ldc "could not open destination file "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ". "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 4
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial jdk.jfr.internal.tool.UserDataException.<init>:(Ljava/lang/String;)V
athrow
end local 4 25: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Ljdk/jfr/internal/tool/Assemble;
0 26 1 options Ljava/util/Deque<Ljava/lang/String;>;
3 26 2 repository Ljava/nio/file/Path;
4 26 3 file Ljava/nio/file/Path;
8 19 6 fos Ljava/io/FileOutputStream;
9 17 7 files Ljava/util/List<Ljava/nio/file/Path;>;
24 25 4 e Ljava/io/IOException;
Exception table:
from to target type
8 17 18 any
7 20 20 any
6 23 23 Class java.io.IOException
Exceptions:
throws jdk.jfr.internal.tool.UserSyntaxException, jdk.jfr.internal.tool.UserDataException
Signature: (Ljava/util/Deque<Ljava/lang/String;>;)V
MethodParameters:
Name Flags
options
private java.util.List<java.nio.file.Path> listJFRFiles(java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=8, args_size=2
start local 0 start local 1 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 2
start local 2 1: aload 1
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.isDirectory:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifeq 15
2: aconst_null
astore 3
aconst_null
astore 4
3: aload 1
ldc "*.jfr"
invokestatic java.nio.file.Files.newDirectoryStream:(Ljava/nio/file/Path;Ljava/lang/String;)Ljava/nio/file/DirectoryStream;
astore 5
start local 5 4: aload 5
invokeinterface java.nio.file.DirectoryStream.iterator:()Ljava/util/Iterator;
astore 7
goto 8
StackMap locals: jdk.jfr.internal.tool.Assemble java.nio.file.Path java.util.List java.lang.Throwable java.lang.Throwable java.nio.file.DirectoryStream top java.util.Iterator
StackMap stack:
5: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.file.Path
astore 6
start local 6 6: aload 6
iconst_0
anewarray java.nio.file.LinkOption
invokestatic java.nio.file.Files.isDirectory:(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z
ifne 8
aload 6
invokestatic java.nio.file.Files.isReadable:(Ljava/nio/file/Path;)Z
ifeq 8
7: aload 2
aload 6
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 6 8: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
9: aload 5
ifnull 15
aload 5
invokeinterface java.nio.file.DirectoryStream.close:()V
goto 15
StackMap locals: jdk.jfr.internal.tool.Assemble java.nio.file.Path java.util.List java.lang.Throwable java.lang.Throwable java.nio.file.DirectoryStream
StackMap stack: java.lang.Throwable
10: astore 3
aload 5
ifnull 11
aload 5
invokeinterface java.nio.file.DirectoryStream.close:()V
end local 5 StackMap locals:
StackMap stack:
11: aload 3
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
12: astore 4
aload 3
ifnonnull 13
aload 4
astore 3
goto 14
StackMap locals:
StackMap stack:
13: aload 3
aload 4
if_acmpeq 14
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
14: aload 3
athrow
15: StackMap locals:
StackMap stack:
aload 2
invokedynamic compare()Ljava/util/Comparator;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;Ljava/lang/Object;)I
jdk/jfr/internal/tool/Assemble.lambda$0(Ljava/nio/file/Path;Ljava/nio/file/Path;)I (6)
(Ljava/nio/file/Path;Ljava/nio/file/Path;)I
invokeinterface java.util.List.sort:(Ljava/util/Comparator;)V
16: aload 2
17: areturn
end local 2 18: StackMap locals: jdk.jfr.internal.tool.Assemble java.nio.file.Path
StackMap stack: java.io.IOException
astore 2
start local 2 19: new jdk.jfr.internal.tool.UserDataException
dup
new java.lang.StringBuilder
dup
ldc "could not list *.jfr for directory "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ". "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial jdk.jfr.internal.tool.UserDataException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Ljdk/jfr/internal/tool/Assemble;
0 20 1 path Ljava/nio/file/Path;
1 18 2 files Ljava/util/List<Ljava/nio/file/Path;>;
4 11 5 stream Ljava/nio/file/DirectoryStream<Ljava/nio/file/Path;>;
6 8 6 p Ljava/nio/file/Path;
19 20 2 ioe Ljava/io/IOException;
Exception table:
from to target type
4 9 10 any
3 12 12 any
0 17 18 Class java.io.IOException
Exceptions:
throws jdk.jfr.internal.tool.UserDataException
Signature: (Ljava/nio/file/Path;)Ljava/util/List<Ljava/nio/file/Path;>;
MethodParameters:
Name Flags
path
private void transferTo(java.util.List<java.nio.file.Path>, java.nio.file.Path, java.nio.channels.FileChannel);
descriptor: (Ljava/util/List;Ljava/nio/file/Path;Ljava/nio/channels/FileChannel;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=17, args_size=4
start local 0 start local 1 start local 2 start local 3 0: lconst_0
lstore 4
start local 4 1: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 21
StackMap locals: jdk.jfr.internal.tool.Assemble java.util.List java.nio.file.Path java.nio.channels.FileChannel long top java.util.Iterator
StackMap stack:
2: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.file.Path
astore 6
start local 6 3: aload 0
new java.lang.StringBuilder
dup
ldc " "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokeinterface java.nio.file.Path.toString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual jdk.jfr.internal.tool.Assemble.println:(Ljava/lang/String;)V
4: aconst_null
astore 8
aconst_null
astore 9
5: aload 6
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.channels.FileChannel.open:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/FileChannel;
astore 10
start local 10 6: aload 6
invokestatic java.nio.file.Files.size:(Ljava/nio/file/Path;)J
lstore 11
start local 11 7: goto 12
8: StackMap locals: jdk.jfr.internal.tool.Assemble java.util.List java.nio.file.Path java.nio.channels.FileChannel long java.nio.file.Path java.util.Iterator java.lang.Throwable java.lang.Throwable java.nio.channels.FileChannel long
StackMap stack:
lload 11
ldc 1048576
invokestatic java.lang.Math.min:(JJ)J
lstore 13
start local 13 9: aload 3
aload 10
lload 4
lload 13
invokevirtual java.nio.channels.FileChannel.transferFrom:(Ljava/nio/channels/ReadableByteChannel;JJ)J
lstore 15
start local 15 10: lload 4
lload 15
ladd
lstore 4
11: lload 11
lload 15
lsub
lstore 11
end local 15 end local 13 12: StackMap locals:
StackMap stack:
lload 11
lconst_0
lcmp
ifgt 8
end local 11 13: aload 10
ifnull 21
aload 10
invokevirtual java.nio.channels.FileChannel.close:()V
goto 21
StackMap locals: jdk.jfr.internal.tool.Assemble java.util.List java.nio.file.Path java.nio.channels.FileChannel long java.nio.file.Path java.util.Iterator java.lang.Throwable java.lang.Throwable java.nio.channels.FileChannel
StackMap stack: java.lang.Throwable
14: astore 8
aload 10
ifnull 15
aload 10
invokevirtual java.nio.channels.FileChannel.close:()V
end local 10 StackMap locals:
StackMap stack:
15: aload 8
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
16: astore 9
aload 8
ifnonnull 17
aload 9
astore 8
goto 18
StackMap locals:
StackMap stack:
17: aload 8
aload 9
if_acmpeq 18
aload 8
aload 9
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
18: aload 8
athrow
StackMap locals: jdk.jfr.internal.tool.Assemble java.util.List java.nio.file.Path java.nio.channels.FileChannel long java.nio.file.Path java.util.Iterator
StackMap stack: java.io.IOException
19: astore 8
start local 8 20: new jdk.jfr.internal.tool.UserDataException
dup
new java.lang.StringBuilder
dup
ldc "could not copy recording chunk "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 6
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " to new file. "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 8
invokevirtual java.io.IOException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial jdk.jfr.internal.tool.UserDataException.<init>:(Ljava/lang/String;)V
athrow
end local 8 end local 6 21: StackMap locals: jdk.jfr.internal.tool.Assemble java.util.List java.nio.file.Path java.nio.channels.FileChannel long top java.util.Iterator
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
22: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Ljdk/jfr/internal/tool/Assemble;
0 23 1 sourceFiles Ljava/util/List<Ljava/nio/file/Path;>;
0 23 2 output Ljava/nio/file/Path;
0 23 3 out Ljava/nio/channels/FileChannel;
1 23 4 pos J
3 21 6 p Ljava/nio/file/Path;
6 15 10 sourceChannel Ljava/nio/channels/FileChannel;
7 13 11 rem J
9 12 13 n J
10 12 15 w J
20 21 8 ioe Ljava/io/IOException;
Exception table:
from to target type
6 13 14 any
5 16 16 any
4 19 19 Class java.io.IOException
Exceptions:
throws jdk.jfr.internal.tool.UserDataException
Signature: (Ljava/util/List<Ljava/nio/file/Path;>;Ljava/nio/file/Path;Ljava/nio/channels/FileChannel;)V
MethodParameters:
Name Flags
sourceFiles
output
out
private static int lambda$0(java.nio.file.Path, java.nio.file.Path);
descriptor: (Ljava/nio/file/Path;Ljava/nio/file/Path;)I
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokeinterface java.nio.file.Path.getFileName:()Ljava/nio/file/Path;
aload 1
invokeinterface java.nio.file.Path.getFileName:()Ljava/nio/file/Path;
invokeinterface java.nio.file.Path.compareTo:(Ljava/nio/file/Path;)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 u Ljava/nio/file/Path;
0 1 1 v Ljava/nio/file/Path;
}
SourceFile: "Assemble.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles