public final class jdk.nashorn.internal.ir.debug.ObjectSizeCalculator
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.nashorn.internal.ir.debug.ObjectSizeCalculator
super_class: java.lang.Object
{
private final int ;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int ;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int objectPadding;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int referenceSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int superclassFieldPadding;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Map<java.lang.Class<?>, jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo> classSizeInfos;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Class<*>;Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$ClassSizeInfo;>;
private final java.util.Map<java.lang.Object, java.lang.Object> alreadyVisited;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Object;Ljava/lang/Object;>;
private final java.util.Map<java.lang.Class<?>, jdk.nashorn.internal.ir.debug.ClassHistogramElement> histogram;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/Class<*>;Ljdk/nashorn/internal/ir/debug/ClassHistogramElement;>;
private final java.util.Deque<java.lang.Object> pending;
descriptor: Ljava/util/Deque;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Deque<Ljava/lang/Object;>;
private long size;
descriptor: J
flags: (0x0002) ACC_PRIVATE
static java.lang.Class<?> managementFactory;
descriptor: Ljava/lang/Class;
flags: (0x0008) ACC_STATIC
Signature: Ljava/lang/Class<*>;
static java.lang.Class<?> memoryPoolMXBean;
descriptor: Ljava/lang/Class;
flags: (0x0008) ACC_STATIC
Signature: Ljava/lang/Class<*>;
static java.lang.Class<?> memoryUsage;
descriptor: Ljava/lang/Class;
flags: (0x0008) ACC_STATIC
Signature: Ljava/lang/Class<*>;
static java.lang.reflect.Method getMemoryPoolMXBeans;
descriptor: Ljava/lang/reflect/Method;
flags: (0x0008) ACC_STATIC
static java.lang.reflect.Method getUsage;
descriptor: Ljava/lang/reflect/Method;
flags: (0x0008) ACC_STATIC
static java.lang.reflect.Method getMax;
descriptor: Ljava/lang/reflect/Method;
flags: (0x0008) ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: aconst_null
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.managementFactory:Ljava/lang/Class;
1: aconst_null
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.memoryPoolMXBean:Ljava/lang/Class;
2: aconst_null
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.memoryUsage:Ljava/lang/Class;
3: aconst_null
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getMemoryPoolMXBeans:Ljava/lang/reflect/Method;
4: aconst_null
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getUsage:Ljava/lang/reflect/Method;
5: aconst_null
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getMax:Ljava/lang/reflect/Method;
6: ldc "java.lang.management.ManagementFactory"
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.managementFactory:Ljava/lang/Class;
7: ldc "java.lang.management.MemoryPoolMXBean"
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.memoryPoolMXBean:Ljava/lang/Class;
8: ldc "java.lang.management.MemoryUsage"
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.memoryUsage:Ljava/lang/Class;
9: getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.managementFactory:Ljava/lang/Class;
ldc "getMemoryPoolMXBeans"
iconst_0
anewarray java.lang.Class
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getMemoryPoolMXBeans:Ljava/lang/reflect/Method;
10: getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.memoryPoolMXBean:Ljava/lang/Class;
ldc "getUsage"
iconst_0
anewarray java.lang.Class
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getUsage:Ljava/lang/reflect/Method;
11: getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.memoryUsage:Ljava/lang/Class;
ldc "getMax"
iconst_0
anewarray java.lang.Class
invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
putstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getMax:Ljava/lang/reflect/Method;
12: goto 14
StackMap locals:
StackMap stack: java.lang.Exception
13: pop
14: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
Exception table:
from to target type
6 12 13 Class java.lang.ClassNotFoundException
6 12 13 Class java.lang.NoSuchMethodException
6 12 13 Class java.lang.SecurityException
public static long getObjectSize(java.lang.Object);
descriptor: (Ljava/lang/Object;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ifnonnull 1
lconst_0
goto 2
StackMap locals:
StackMap stack:
1: new jdk.nashorn.internal.ir.debug.ObjectSizeCalculator
dup
getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$CurrentLayout.SPEC:Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$MemoryLayoutSpecification;
invokespecial jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.<init>:(Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$MemoryLayoutSpecification;)V
aload 0
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.calculateObjectSize:(Ljava/lang/Object;)J
StackMap locals:
StackMap stack: long
2: lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 obj Ljava/lang/Object;
Exceptions:
throws java.lang.UnsupportedOperationException
MethodParameters:
Name Flags
obj final
public void <init>(jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification);
descriptor: (Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$MemoryLayoutSpecification;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.IdentityHashMap
dup
invokespecial java.util.IdentityHashMap.<init>:()V
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.classSizeInfos:Ljava/util/Map;
2: aload 0
new java.util.IdentityHashMap
dup
invokespecial java.util.IdentityHashMap.<init>:()V
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.alreadyVisited:Ljava/util/Map;
3: aload 0
new java.util.IdentityHashMap
dup
invokespecial java.util.IdentityHashMap.<init>:()V
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.histogram:Ljava/util/Map;
4: aload 0
new java.util.ArrayDeque
dup
sipush 16384
invokespecial java.util.ArrayDeque.<init>:(I)V
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.pending:Ljava/util/Deque;
5: aload 1
invokestatic java.util.Objects.requireNonNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
6: aload 0
aload 1
invokeinterface jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification.getArrayHeaderSize:()I
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.arrayHeaderSize:I
7: aload 0
aload 1
invokeinterface jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification.getObjectHeaderSize:()I
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.objectHeaderSize:I
8: aload 0
aload 1
invokeinterface jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification.getObjectPadding:()I
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.objectPadding:I
9: aload 0
aload 1
invokeinterface jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification.getReferenceSize:()I
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.referenceSize:I
10: aload 0
aload 1
invokeinterface jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification.getSuperclassFieldPadding:()I
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.superclassFieldPadding:I
11: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 12 1 memoryLayoutSpecification Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$MemoryLayoutSpecification;
MethodParameters:
Name Flags
memoryLayoutSpecification final
public synchronized long calculateObjectSize(java.lang.Object);
descriptor: (Ljava/lang/Object;)J
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=6, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.histogram:Ljava/util/Map;
invokeinterface java.util.Map.clear:()V
1: aload 1
astore 2
start local 2 2: StackMap locals: java.lang.Object
StackMap stack:
aload 0
aload 2
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.visit:(Ljava/lang/Object;)V
3: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.pending:Ljava/util/Deque;
invokeinterface java.util.Deque.isEmpty:()Z
ifeq 9
4: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.size:J
lstore 4
5: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.alreadyVisited:Ljava/util/Map;
invokeinterface java.util.Map.clear:()V
6: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.pending:Ljava/util/Deque;
invokeinterface java.util.Deque.clear:()V
7: aload 0
lconst_0
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.size:J
8: lload 4
lreturn
9: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.pending:Ljava/util/Deque;
invokeinterface java.util.Deque.removeFirst:()Ljava/lang/Object;
astore 2
10: goto 2
end local 2 11: StackMap locals: jdk.nashorn.internal.ir.debug.ObjectSizeCalculator java.lang.Object
StackMap stack: java.lang.Throwable
astore 3
12: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.alreadyVisited:Ljava/util/Map;
invokeinterface java.util.Map.clear:()V
13: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.pending:Ljava/util/Deque;
invokeinterface java.util.Deque.clear:()V
14: aload 0
lconst_0
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.size:J
15: aload 3
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 16 1 obj Ljava/lang/Object;
2 11 2 o Ljava/lang/Object;
Exception table:
from to target type
1 5 11 any
9 11 11 any
MethodParameters:
Name Flags
obj final
public java.util.List<jdk.nashorn.internal.ir.debug.ClassHistogramElement> getClassHistogram();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.util.ArrayList
dup
aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.histogram:Ljava/util/Map;
invokeinterface java.util.Map.values:()Ljava/util/Collection;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
Signature: ()Ljava/util/List<Ljdk/nashorn/internal/ir/debug/ClassHistogramElement;>;
private jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo getClassSizeInfo(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$ClassSizeInfo;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.classSizeInfos:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo
astore 2
start local 2 1: aload 2
ifnonnull 4
2: new jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo
dup
aload 0
aload 1
invokespecial jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo.<init>:(Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;Ljava/lang/Class;)V
astore 2
3: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.classSizeInfos:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: StackMap locals: jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 5 1 clazz Ljava/lang/Class<*>;
1 5 2 csi Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$ClassSizeInfo;
Signature: (Ljava/lang/Class<*>;)Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$ClassSizeInfo;
MethodParameters:
Name Flags
clazz final
private void visit(java.lang.Object);
descriptor: (Ljava/lang/Object;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.alreadyVisited:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
astore 2
start local 2 3: aload 2
ldc Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$ArrayElementsVisitor;
if_acmpne 6
4: aload 1
checkcast jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ArrayElementsVisitor
aload 0
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ArrayElementsVisitor.visit:(Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;)V
5: goto 11
6: StackMap locals: java.lang.Class
StackMap stack:
aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.alreadyVisited:Ljava/util/Map;
aload 1
aload 1
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
7: aload 2
invokevirtual java.lang.Class.isArray:()Z
ifeq 10
8: aload 0
aload 1
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.visitArray:(Ljava/lang/Object;)V
9: goto 11
10: StackMap locals:
StackMap stack:
aload 0
aload 2
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getClassSizeInfo:(Ljava/lang/Class;)Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$ClassSizeInfo;
aload 1
aload 0
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo.visit:(Ljava/lang/Object;Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;)V
11: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 12 1 obj Ljava/lang/Object;
3 12 2 clazz Ljava/lang/Class<*>;
MethodParameters:
Name Flags
obj final
private void visitArray(java.lang.Object);
descriptor: (Ljava/lang/Object;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
astore 2
start local 2 1: aload 2
invokevirtual java.lang.Class.getComponentType:()Ljava/lang/Class;
astore 3
start local 3 2: aload 1
invokestatic java.lang.reflect.Array.getLength:(Ljava/lang/Object;)I
istore 4
start local 4 3: aload 3
invokevirtual java.lang.Class.isPrimitive:()Z
ifeq 6
4: aload 0
aload 2
iload 4
aload 3
invokestatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getPrimitiveFieldSize:(Ljava/lang/Class;)J
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.increaseByArraySize:(Ljava/lang/Class;IJ)V
5: goto 12
6: StackMap locals: java.lang.Class java.lang.Class int
StackMap stack:
aload 0
aload 2
iload 4
aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.referenceSize:I
i2l
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.increaseByArraySize:(Ljava/lang/Class;IJ)V
7: iload 4
tableswitch { // 0 - 1
0: 8
1: 9
default: 11
}
8: StackMap locals:
StackMap stack:
goto 12
9: StackMap locals:
StackMap stack:
aload 0
aload 1
iconst_0
invokestatic java.lang.reflect.Array.get:(Ljava/lang/Object;I)Ljava/lang/Object;
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.enqueue:(Ljava/lang/Object;)V
10: goto 12
11: StackMap locals:
StackMap stack:
aload 0
new jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ArrayElementsVisitor
dup
aload 1
checkcast java.lang.Object[]
invokespecial jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ArrayElementsVisitor.<init>:([Ljava/lang/Object;)V
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.enqueue:(Ljava/lang/Object;)V
12: 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 13 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 13 1 array Ljava/lang/Object;
1 13 2 arrayClass Ljava/lang/Class<*>;
2 13 3 componentType Ljava/lang/Class<*>;
3 13 4 length I
MethodParameters:
Name Flags
array final
private void increaseByArraySize(java.lang.Class<?>, int, );
descriptor: (Ljava/lang/Class;IJ)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.arrayHeaderSize:I
i2l
iload 2
i2l
lload 3
lmul
ladd
aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.objectPadding:I
invokestatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.roundTo:(JI)J
invokevirtual jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.increaseSize:(Ljava/lang/Class;J)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 2 1 clazz Ljava/lang/Class<*>;
0 2 2 length I
0 2 3 elementSize J
Signature: (Ljava/lang/Class<*>;IJ)V
MethodParameters:
Name Flags
clazz final
length final
elementSize final
void enqueue(java.lang.Object);
descriptor: (Ljava/lang/Object;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ifnull 2
1: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.pending:Ljava/util/Deque;
aload 1
invokeinterface java.util.Deque.addLast:(Ljava/lang/Object;)V
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 3 1 obj Ljava/lang/Object;
MethodParameters:
Name Flags
obj final
void increaseSize(java.lang.Class<?>, );
descriptor: (Ljava/lang/Class;J)V
flags: (0x0000)
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.histogram:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.nashorn.internal.ir.debug.ClassHistogramElement
astore 4
start local 4 1: aload 4
ifnonnull 4
2: new jdk.nashorn.internal.ir.debug.ClassHistogramElement
dup
aload 1
invokespecial jdk.nashorn.internal.ir.debug.ClassHistogramElement.<init>:(Ljava/lang/Class;)V
astore 4
3: aload 0
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.histogram:Ljava/util/Map;
aload 1
aload 4
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: StackMap locals: jdk.nashorn.internal.ir.debug.ClassHistogramElement
StackMap stack:
aload 4
lload 2
invokevirtual jdk.nashorn.internal.ir.debug.ClassHistogramElement.addInstance:(J)V
5: aload 0
dup
getfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.size:J
lload 2
ladd
putfield jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.size:J
6: return
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator;
0 7 1 clazz Ljava/lang/Class<*>;
0 7 2 objectSize J
1 7 4 he Ljdk/nashorn/internal/ir/debug/ClassHistogramElement;
Signature: (Ljava/lang/Class<*>;J)V
MethodParameters:
Name Flags
clazz final
objectSize final
static long roundTo(long, int);
descriptor: (JI)J
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 2 0: lload 0
iload 2
i2l
ladd
lconst_1
lsub
iload 2
i2l
ldiv
iload 2
i2l
lmul
lreturn
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 x J
0 1 2 multiple I
MethodParameters:
Name Flags
x final
multiple final
private static long getPrimitiveFieldSize(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)J
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
getstatic java.lang.Boolean.TYPE:Ljava/lang/Class;
if_acmpeq 1
aload 0
getstatic java.lang.Byte.TYPE:Ljava/lang/Class;
if_acmpne 2
1: StackMap locals:
StackMap stack:
lconst_1
lreturn
2: StackMap locals:
StackMap stack:
aload 0
getstatic java.lang.Character.TYPE:Ljava/lang/Class;
if_acmpeq 3
aload 0
getstatic java.lang.Short.TYPE:Ljava/lang/Class;
if_acmpne 4
3: StackMap locals:
StackMap stack:
ldc 2
lreturn
4: StackMap locals:
StackMap stack:
aload 0
getstatic java.lang.Integer.TYPE:Ljava/lang/Class;
if_acmpeq 5
aload 0
getstatic java.lang.Float.TYPE:Ljava/lang/Class;
if_acmpne 6
5: StackMap locals:
StackMap stack:
ldc 4
lreturn
6: StackMap locals:
StackMap stack:
aload 0
getstatic java.lang.Long.TYPE:Ljava/lang/Class;
if_acmpeq 7
aload 0
getstatic java.lang.Double.TYPE:Ljava/lang/Class;
if_acmpne 8
7: StackMap locals:
StackMap stack:
ldc 8
lreturn
8: StackMap locals:
StackMap stack:
new java.lang.AssertionError
dup
new java.lang.StringBuilder
dup
ldc "Encountered unexpected primitive type "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
9: aload 0
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
10: invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 type Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)J
MethodParameters:
Name Flags
type final
public static jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification getEffectiveMemoryLayoutSpecification();
descriptor: ()Ljdk/nashorn/internal/ir/debug/ObjectSizeCalculator$MemoryLayoutSpecification;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=11, args_size=0
0: ldc "java.vm.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 0
start local 0 1: aload 0
ifnull 2
aload 0
ldc "Java HotSpot(TM) "
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 5
2: StackMap locals: java.lang.String
StackMap stack:
new java.lang.UnsupportedOperationException
dup
3: ldc "ObjectSizeCalculator only supported on HotSpot VM"
4: invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
ldc "sun.arch.data.model"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 1
start local 1 6: ldc "32"
aload 1
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 8
7: new jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$1
dup
invokespecial jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$1.<init>:()V
areturn
8: StackMap locals: java.lang.String
StackMap stack:
ldc "64"
aload 1
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 12
9: new java.lang.UnsupportedOperationException
dup
new java.lang.StringBuilder
dup
ldc "Unrecognized value '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
10: aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "' of sun.arch.data.model system property"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
11: invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
12: StackMap locals:
StackMap stack:
ldc "java.vm.version"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
astore 2
start local 2 13: aload 2
iconst_0
14: aload 2
bipush 46
invokevirtual java.lang.String.indexOf:(I)I
15: invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 3
start local 3 16: iload 3
bipush 17
if_icmplt 32
17: lconst_0
lstore 4
start local 4 18: getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getMemoryPoolMXBeans:Ljava/lang/reflect/Method;
ifnonnull 20
19: new java.lang.AssertionError
dup
ldc "java.lang.management not available in compact 1"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
20: StackMap locals: java.lang.String int long
StackMap stack:
getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getMemoryPoolMXBeans:Ljava/lang/reflect/Method;
getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.managementFactory:Ljava/lang/Class;
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.List
astore 6
start local 6 21: aload 6
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 8
goto 26
StackMap locals: java.lang.String java.lang.String java.lang.String int long java.util.List top java.util.Iterator
StackMap stack:
22: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
astore 7
start local 7 23: getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getUsage:Ljava/lang/reflect/Method;
aload 7
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
astore 9
start local 9 24: getstatic jdk.nashorn.internal.ir.debug.ObjectSizeCalculator.getMax:Ljava/lang/reflect/Method;
aload 9
iconst_0
anewarray java.lang.Object
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
astore 10
start local 10 25: lload 4
aload 10
checkcast java.lang.Long
invokevirtual java.lang.Long.longValue:()J
ladd
lstore 4
end local 10 end local 9 end local 7 26: StackMap locals:
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 22
end local 6 27: goto 30
28: StackMap locals: java.lang.String java.lang.String java.lang.String int long
StackMap stack: java.lang.Exception
pop
29: new java.lang.AssertionError
dup
ldc "java.lang.management not available in compact 1"
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
30: StackMap locals:
StackMap stack:
lload 4
ldc 32212254720
lcmp
ifge 32
31: new jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$2
dup
invokespecial jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$2.<init>:()V
areturn
end local 4 32: StackMap locals:
StackMap stack:
new jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$3
dup
invokespecial jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$3.<init>:()V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 33 0 vmName Ljava/lang/String;
6 33 1 dataModel Ljava/lang/String;
13 33 2 strVmVersion Ljava/lang/String;
16 33 3 vmVersion I
18 32 4 maxMemory J
21 27 6 memoryPoolMXBeans Ljava/util/List<*>;
23 26 7 mp Ljava/lang/Object;
24 26 9 usage Ljava/lang/Object;
25 26 10 max Ljava/lang/Object;
Exception table:
from to target type
20 27 28 Class java.lang.IllegalAccessException
20 27 28 Class java.lang.IllegalArgumentException
20 27 28 Class java.lang.reflect.InvocationTargetException
}
SourceFile: "ObjectSizeCalculator.java"
NestMembers:
jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$1 jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$2 jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$3 jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ArrayElementsVisitor jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$CurrentLayout jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification
InnerClasses:
jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$1
jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$2
jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$3
private ArrayElementsVisitor = jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ArrayElementsVisitor of jdk.nashorn.internal.ir.debug.ObjectSizeCalculator
private ClassSizeInfo = jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$ClassSizeInfo of jdk.nashorn.internal.ir.debug.ObjectSizeCalculator
private CurrentLayout = jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$CurrentLayout of jdk.nashorn.internal.ir.debug.ObjectSizeCalculator
public abstract MemoryLayoutSpecification = jdk.nashorn.internal.ir.debug.ObjectSizeCalculator$MemoryLayoutSpecification of jdk.nashorn.internal.ir.debug.ObjectSizeCalculator