public class org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark extends org.graalvm.compiler.hotspot.test.HotSpotGraalCompilerTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark
super_class: org.graalvm.compiler.hotspot.test.HotSpotGraalCompilerTest
{
private static final boolean verbose;
descriptor: Z
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "verbose"
invokestatic java.lang.Boolean.getBoolean:(Ljava/lang/String;)Z
putstatic org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.verbose:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial org.graalvm.compiler.hotspot.test.HotSpotGraalCompilerTest.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/compiler/hotspot/test/MemoryUsageBenchmark;
public static int simple(int, int);
descriptor: (II)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: iload 0
iload 1
iadd
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 a I
0 1 1 b I
MethodParameters:
Name Flags
a
b
public static synchronized int complex(java.lang.CharSequence);
descriptor: (Ljava/lang/CharSequence;)I
flags: (0x0029) ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
instanceof java.lang.String
ifeq 2
1: aload 0
invokevirtual java.lang.Object.hashCode:()I
ireturn
2: StackMap locals:
StackMap stack:
aload 0
instanceof java.lang.StringBuilder
ifeq 6
3: iconst_1
newarray 10
astore 1
start local 1 4: aload 0
invokeinterface java.lang.CharSequence.chars:()Ljava/util/stream/IntStream;
aload 1
invokedynamic accept([I)Ljava/util/function/IntConsumer;
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:
(I)V
org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.lambda$0([II)V (6)
(I)V
invokeinterface java.util.stream.IntStream.forEach:(Ljava/util/function/IntConsumer;)V
5: aload 1
iconst_0
iaload
ireturn
end local 1 6: StackMap locals:
StackMap stack:
iconst_0
istore 1
start local 1 7: aload 0
dup
astore 2
monitorenter
8: aload 0
invokeinterface java.lang.CharSequence.length:()I
istore 1
9: aload 2
monitorexit
10: goto 13
StackMap locals: java.lang.CharSequence int java.lang.CharSequence
StackMap stack: java.lang.Throwable
11: aload 2
monitorexit
12: athrow
13: StackMap locals:
StackMap stack:
aload 0
dup
astore 2
monitorenter
14: aload 0
invokevirtual java.lang.Object.hashCode:()I
bipush 31
ixor
istore 1
15: aload 2
monitorexit
16: goto 19
StackMap locals: java.lang.CharSequence int java.lang.CharSequence
StackMap stack: java.lang.Throwable
17: aload 2
monitorexit
18: athrow
19: StackMap locals:
StackMap stack:
iconst_0
istore 2
start local 2 20: goto 23
21: StackMap locals: int
StackMap stack:
iload 1
aload 0
iload 2
invokeinterface java.lang.CharSequence.charAt:(I)C
imul
istore 1
22: iinc 2 1
StackMap locals:
StackMap stack:
23: iload 2
aload 0
invokeinterface java.lang.CharSequence.length:()I
if_icmplt 21
end local 2 24: iconst_0
istore 2
start local 2 25: iconst_0
istore 3
start local 3 26: goto 29
27: StackMap locals: int
StackMap stack:
iload 2
iload 3
iconst_2
imul
iadd
istore 2
28: iinc 3 1
StackMap locals:
StackMap stack:
29: iload 3
iconst_5
if_icmplt 27
end local 3 30: iload 1
iload 2
iadd
istore 1
31: iload 1
new java.lang.String
dup
ldc "asdf"
invokespecial java.lang.String.<init>:(Ljava/lang/String;)V
invokevirtual java.lang.String.length:()I
iadd
istore 1
32: iload 1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 33 0 cs Ljava/lang/CharSequence;
4 6 1 hash [I
7 33 1 res I
20 24 2 i I
25 33 2 sum I
26 30 3 i I
Exception table:
from to target type
8 10 11 any
11 12 11 any
14 16 17 any
17 18 17 any
MethodParameters:
Name Flags
cs
public static void main(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: invokestatic org.graalvm.compiler.api.test.Graal.getRuntime:()Lorg/graalvm/compiler/api/runtime/GraalRuntime;
pop
1: invokestatic org.graalvm.compiler.debug.Debug.isEnabled:()Z
ifeq 3
invokestatic org.graalvm.compiler.debug.internal.DebugScope.getConfig:()Lorg/graalvm/compiler/debug/DebugConfig;
ifnonnull 3
2: getstatic java.lang.System.out:Ljava/io/PrintStream;
iconst_0
anewarray java.lang.Object
invokestatic org.graalvm.compiler.debug.DebugEnvironment.initialize:(Ljava/io/PrintStream;[Ljava/lang/Object;)Lorg/graalvm/compiler/debug/GraalDebugConfig;
pop
3: StackMap locals:
StackMap stack:
new org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark
dup
invokespecial org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.<init>:()V
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.run:()V
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 args [Ljava/lang/String;
MethodParameters:
Name Flags
args
private void doCompilation(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=13, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.getResolvedJavaMethod:(Ljava/lang/String;)Ljdk/vm/ci/meta/ResolvedJavaMethod;
checkcast jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod
astore 3
start local 3 1: aload 3
invokeinterface jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod.reprofile:()V
2: lconst_0
lstore 4
start local 4 3: aconst_null
astore 6
aconst_null
astore 7
4: aload 2
ifnonnull 5
aconst_null
goto 6
StackMap locals: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String java.lang.String jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod long java.lang.Throwable java.lang.Throwable
StackMap stack:
5: new org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable
dup
aload 2
invokespecial org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable.<init>:(Ljava/lang/String;)V
StackMap locals:
StackMap stack: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable
6: astore 8
start local 8 7: invokestatic jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime:()Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntime;
astore 9
start local 9 8: iconst_m1
istore 10
start local 10 9: new jdk.vm.ci.hotspot.HotSpotCompilationRequest
dup
aload 3
iload 10
lload 4
invokespecial jdk.vm.ci.hotspot.HotSpotCompilationRequest.<init>:(Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;IJ)V
astore 11
start local 11 10: new org.graalvm.compiler.hotspot.CompilationTask
dup
aload 9
aload 9
invokeinterface jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getCompiler:()Ljdk/vm/ci/runtime/JVMCICompiler;
checkcast org.graalvm.compiler.hotspot.HotSpotGraalCompiler
aload 11
iconst_1
iconst_0
invokespecial org.graalvm.compiler.hotspot.CompilationTask.<init>:(Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider;Lorg/graalvm/compiler/hotspot/HotSpotGraalCompiler;Ljdk/vm/ci/hotspot/HotSpotCompilationRequest;ZZ)V
astore 12
start local 12 11: aload 12
invokevirtual org.graalvm.compiler.hotspot.CompilationTask.runCompilation:()Ljdk/vm/ci/hotspot/HotSpotCompilationRequestResult;
pop
end local 12 end local 11 end local 10 end local 9 12: aload 8
ifnull 18
aload 8
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable.close:()V
goto 18
StackMap locals: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String java.lang.String jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod long java.lang.Throwable java.lang.Throwable org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable
StackMap stack: java.lang.Throwable
13: astore 6
aload 8
ifnull 14
aload 8
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable.close:()V
end local 8 StackMap locals:
StackMap stack:
14: aload 6
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
15: astore 7
aload 6
ifnonnull 16
aload 7
astore 6
goto 17
StackMap locals:
StackMap stack:
16: aload 6
aload 7
if_acmpeq 17
aload 6
aload 7
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
17: aload 6
athrow
18: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lorg/graalvm/compiler/hotspot/test/MemoryUsageBenchmark;
0 19 1 methodName Ljava/lang/String;
0 19 2 label Ljava/lang/String;
1 19 3 method Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;
3 19 4 jvmciEnv J
7 14 8 c Lorg/graalvm/compiler/hotspot/test/MemoryUsageBenchmark$MemoryUsageCloseable;
8 12 9 runtime Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider;
9 12 10 entryBCI I
10 12 11 request Ljdk/vm/ci/hotspot/HotSpotCompilationRequest;
11 12 12 task Lorg/graalvm/compiler/hotspot/CompilationTask;
Exception table:
from to target type
7 12 13 any
4 15 15 any
MethodParameters:
Name Flags
methodName
label
private void allocSpyCompilation(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=11, args_size=2
start local 0 start local 1 0: invokestatic org.graalvm.compiler.core.test.AllocSpy.isEnabled:()Z
ifeq 16
1: aload 0
aload 1
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.getResolvedJavaMethod:(Ljava/lang/String;)Ljdk/vm/ci/meta/ResolvedJavaMethod;
checkcast jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod
astore 2
start local 2 2: aload 2
invokeinterface jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod.reprofile:()V
3: lconst_0
lstore 3
start local 3 4: aconst_null
astore 5
aconst_null
astore 6
5: aload 1
invokestatic org.graalvm.compiler.core.test.AllocSpy.open:(Ljava/lang/Object;)Lorg/graalvm/compiler/core/test/AllocSpy;
astore 7
start local 7 6: invokestatic jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime:()Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntime;
astore 8
start local 8 7: new jdk.vm.ci.hotspot.HotSpotCompilationRequest
dup
aload 2
iconst_m1
lload 3
invokespecial jdk.vm.ci.hotspot.HotSpotCompilationRequest.<init>:(Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;IJ)V
astore 9
start local 9 8: new org.graalvm.compiler.hotspot.CompilationTask
dup
aload 8
aload 8
invokeinterface jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getCompiler:()Ljdk/vm/ci/runtime/JVMCICompiler;
checkcast org.graalvm.compiler.hotspot.HotSpotGraalCompiler
aload 9
iconst_1
iconst_0
invokespecial org.graalvm.compiler.hotspot.CompilationTask.<init>:(Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider;Lorg/graalvm/compiler/hotspot/HotSpotGraalCompiler;Ljdk/vm/ci/hotspot/HotSpotCompilationRequest;ZZ)V
astore 10
start local 10 9: aload 10
invokevirtual org.graalvm.compiler.hotspot.CompilationTask.runCompilation:()Ljdk/vm/ci/hotspot/HotSpotCompilationRequestResult;
pop
end local 10 end local 9 end local 8 10: aload 7
ifnull 16
aload 7
invokevirtual org.graalvm.compiler.core.test.AllocSpy.close:()V
goto 16
StackMap locals: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod long java.lang.Throwable java.lang.Throwable org.graalvm.compiler.core.test.AllocSpy
StackMap stack: java.lang.Throwable
11: astore 5
aload 7
ifnull 12
aload 7
invokevirtual org.graalvm.compiler.core.test.AllocSpy.close:()V
end local 7 StackMap locals:
StackMap stack:
12: aload 5
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
13: astore 6
aload 5
ifnonnull 14
aload 6
astore 5
goto 15
StackMap locals:
StackMap stack:
14: aload 5
aload 6
if_acmpeq 15
aload 5
aload 6
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
15: aload 5
athrow
end local 3 end local 2 16: StackMap locals: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/graalvm/compiler/hotspot/test/MemoryUsageBenchmark;
0 17 1 methodName Ljava/lang/String;
2 16 2 method Ljdk/vm/ci/hotspot/HotSpotResolvedJavaMethod;
4 16 3 jvmciEnv J
6 12 7 as Lorg/graalvm/compiler/core/test/AllocSpy;
7 10 8 runtime Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider;
8 10 9 request Ljdk/vm/ci/hotspot/HotSpotCompilationRequest;
9 10 10 task Lorg/graalvm/compiler/hotspot/CompilationTask;
Exception table:
from to target type
6 10 11 any
5 13 13 any
MethodParameters:
Name Flags
methodName
private void compileAndTime(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
getstatic org.graalvm.compiler.nodes.StructuredGraph$AllowAssumptions.YES:Lorg/graalvm/compiler/nodes/StructuredGraph$AllowAssumptions;
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.parseEager:(Ljava/lang/String;Lorg/graalvm/compiler/nodes/StructuredGraph$AllowAssumptions;)Lorg/graalvm/compiler/nodes/StructuredGraph;
pop
1: iconst_0
istore 2
start local 2 2: goto 7
3: StackMap locals: int
StackMap stack:
aload 0
aload 1
getstatic org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.verbose:Z
ifeq 4
new java.lang.StringBuilder
dup
aload 1
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "[warmup-"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
iload 2
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
goto 5
StackMap locals: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String int
StackMap stack: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String
4: aconst_null
StackMap locals: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String int
StackMap stack: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark java.lang.String java.lang.String
5: invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.doCompilation:(Ljava/lang/String;Ljava/lang/String;)V
6: iinc 2 1
StackMap locals:
StackMap stack:
7: iload 2
bipush 10
if_icmplt 3
end local 2 8: aload 0
aload 1
aload 1
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.doCompilation:(Ljava/lang/String;Ljava/lang/String;)V
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/graalvm/compiler/hotspot/test/MemoryUsageBenchmark;
0 10 1 methodName Ljava/lang/String;
2 8 2 i I
MethodParameters:
Name Flags
methodName
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
ldc "simple"
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.compileAndTime:(Ljava/lang/String;)V
1: aload 0
ldc "complex"
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.compileAndTime:(Ljava/lang/String;)V
2: getstatic org.graalvm.compiler.hotspot.CompileTheWorldOptions.CompileTheWorldClasspath:Lorg/graalvm/compiler/options/OptionValue;
invokevirtual org.graalvm.compiler.options.OptionValue.getValue:()Ljava/lang/Object;
ldc "sun.boot.class.path"
if_acmpeq 9
3: invokestatic jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime:()Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntime;
astore 1
start local 1 4: new org.graalvm.compiler.hotspot.CompileTheWorld
dup
aload 1
aload 1
invokeinterface jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getCompiler:()Ljdk/vm/ci/runtime/JVMCICompiler;
checkcast org.graalvm.compiler.hotspot.HotSpotGraalCompiler
invokespecial org.graalvm.compiler.hotspot.CompileTheWorld.<init>:(Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider;Lorg/graalvm/compiler/hotspot/HotSpotGraalCompiler;)V
astore 2
start local 2 5: aload 2
invokevirtual org.graalvm.compiler.hotspot.CompileTheWorld.compile:()V
6: goto 9
StackMap locals: org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider org.graalvm.compiler.hotspot.CompileTheWorld
StackMap stack: java.lang.Throwable
7: astore 3
start local 3 8: aload 3
invokevirtual java.lang.Throwable.printStackTrace:()V
end local 3 end local 2 end local 1 9: StackMap locals:
StackMap stack:
aload 0
ldc "simple"
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.allocSpyCompilation:(Ljava/lang/String;)V
10: aload 0
ldc "complex"
invokevirtual org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark.allocSpyCompilation:(Ljava/lang/String;)V
11: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/graalvm/compiler/hotspot/test/MemoryUsageBenchmark;
4 9 1 runtime Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntimeProvider;
5 9 2 ctw Lorg/graalvm/compiler/hotspot/CompileTheWorld;
8 9 3 e Ljava/lang/Throwable;
Exception table:
from to target type
5 6 7 Class java.lang.Throwable
private static void lambda$0(int[], int);
descriptor: ([II)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=4, locals=2, args_size=2
start local 1 0: aload 0
iconst_0
dup2
iaload
iload 1
iadd
dup_x2
iastore
return
end local 1 LocalVariableTable:
Start End Slot Name Signature
0 1 1 c I
}
SourceFile: "MemoryUsageBenchmark.java"
NestMembers:
org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
MemoryUsageCloseable = org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark$MemoryUsageCloseable of org.graalvm.compiler.hotspot.test.MemoryUsageBenchmark
public final AllowAssumptions = org.graalvm.compiler.nodes.StructuredGraph$AllowAssumptions of org.graalvm.compiler.nodes.StructuredGraph