public class org.jruby.ir.interpreter.Profiler
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ir.interpreter.Profiler
super_class: java.lang.Object
{
private static org.jruby.ir.interpreter.Profiler$IRCallSite callerSite;
descriptor: Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static int inlineCount;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static int globalThreadPollCount;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static int codeModificationsCount;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static int numCyclesWithNoModifications;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static int versionCount;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static java.util.HashMap<org.jruby.ir.IRScope, java.lang.Integer> scopeVersionMap;
descriptor: Ljava/util/HashMap;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Signature: Ljava/util/HashMap<Lorg/jruby/ir/IRScope;Ljava/lang/Integer;>;
private static java.util.HashMap<org.jruby.ir.IRScope, org.jruby.ir.Counter> scopeThreadPollCounts;
descriptor: Ljava/util/HashMap;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Signature: Ljava/util/HashMap<Lorg/jruby/ir/IRScope;Lorg/jruby/ir/Counter;>;
private static java.util.HashMap<java.lang.Long, org.jruby.ir.interpreter.Profiler$CallSiteProfile> callProfile;
descriptor: Ljava/util/HashMap;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Signature: Ljava/util/HashMap<Ljava/lang/Long;Lorg/jruby/ir/interpreter/Profiler$CallSiteProfile;>;
private static java.util.HashMap<org.jruby.ir.Operation, org.jruby.ir.Counter> opStats;
descriptor: Ljava/util/HashMap;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Signature: Ljava/util/HashMap<Lorg/jruby/ir/Operation;Lorg/jruby/ir/Counter;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.jruby.ir.interpreter.Profiler$IRCallSite
dup
invokespecial org.jruby.ir.interpreter.Profiler$IRCallSite.<init>:()V
putstatic org.jruby.ir.interpreter.Profiler.callerSite:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
1: iconst_0
putstatic org.jruby.ir.interpreter.Profiler.inlineCount:I
2: iconst_0
putstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
3: iconst_0
putstatic org.jruby.ir.interpreter.Profiler.codeModificationsCount:I
4: iconst_0
putstatic org.jruby.ir.interpreter.Profiler.numCyclesWithNoModifications:I
5: iconst_1
putstatic org.jruby.ir.interpreter.Profiler.versionCount:I
6: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic org.jruby.ir.interpreter.Profiler.scopeVersionMap:Ljava/util/HashMap;
7: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic org.jruby.ir.interpreter.Profiler.scopeThreadPollCounts:Ljava/util/HashMap;
8: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic org.jruby.ir.interpreter.Profiler.callProfile:Ljava/util/HashMap;
9: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic org.jruby.ir.interpreter.Profiler.opStats:Ljava/util/HashMap;
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 java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ir/interpreter/Profiler;
private static void analyzeProfile();
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=20, args_size=0
0: getstatic org.jruby.ir.interpreter.Profiler.versionCount:I
iconst_1
iadd
putstatic org.jruby.ir.interpreter.Profiler.versionCount:I
1: getstatic org.jruby.ir.interpreter.Profiler.codeModificationsCount:I
ifne 2
getstatic org.jruby.ir.interpreter.Profiler.numCyclesWithNoModifications:I
iconst_1
iadd
putstatic org.jruby.ir.interpreter.Profiler.numCyclesWithNoModifications:I
goto 3
2: StackMap locals:
StackMap stack:
iconst_0
putstatic org.jruby.ir.interpreter.Profiler.numCyclesWithNoModifications:I
3: StackMap locals:
StackMap stack:
iconst_0
putstatic org.jruby.ir.interpreter.Profiler.codeModificationsCount:I
4: getstatic org.jruby.ir.interpreter.Profiler.numCyclesWithNoModifications:I
iconst_3
if_icmpge 5
return
5: StackMap locals:
StackMap stack:
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
astore 0
start local 0 6: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 1
start local 1 7: lconst_0
lstore 2
start local 2 8: getstatic org.jruby.ir.interpreter.Profiler.callProfile:Ljava/util/HashMap;
invokevirtual java.util.HashMap.keySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 5
goto 38
StackMap locals: java.util.HashMap java.util.ArrayList long top java.util.Iterator
StackMap stack:
9: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.Long
astore 4
start local 4 10: getstatic org.jruby.ir.interpreter.Profiler.callProfile:Ljava/util/HashMap;
aload 4
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.ir.interpreter.Profiler$CallSiteProfile
astore 7
start local 7 11: aload 7
getfield org.jruby.ir.interpreter.Profiler$CallSiteProfile.cs:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
astore 8
start local 8 12: aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.v:I
getstatic org.jruby.ir.interpreter.Profiler.scopeVersionMap:Ljava/util/HashMap;
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.s:Lorg/jruby/ir/IRScope;
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Integer
invokevirtual java.lang.Integer.intValue:()I
if_icmpeq 15
13: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Skipping callsite: <"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.s:Lorg/jruby/ir/IRScope;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ","
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.v:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "> with compiled version: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
getstatic org.jruby.ir.interpreter.Profiler.scopeVersionMap:Ljava/util/HashMap;
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.s:Lorg/jruby/ir/IRScope;
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
14: goto 38
15: StackMap locals: java.util.HashMap java.util.ArrayList long java.lang.Long java.util.Iterator top org.jruby.ir.interpreter.Profiler$CallSiteProfile org.jruby.ir.interpreter.Profiler$IRCallSite
StackMap stack:
aload 7
getfield org.jruby.ir.interpreter.Profiler$CallSiteProfile.counters:Ljava/util/HashMap;
invokevirtual java.util.HashMap.keySet:()Ljava/util/Set;
astore 9
start local 9 16: aload 8
lconst_0
putfield org.jruby.ir.interpreter.Profiler$IRCallSite.count:J
17: aload 9
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 11
goto 26
StackMap locals: java.util.HashMap java.util.ArrayList long java.lang.Long java.util.Iterator top org.jruby.ir.interpreter.Profiler$CallSiteProfile org.jruby.ir.interpreter.Profiler$IRCallSite java.util.Set top java.util.Iterator
StackMap stack:
18: aload 11
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.IRScope
astore 10
start local 10 19: aload 0
aload 10
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Long
astore 6
start local 6 20: aload 6
ifnonnull 23
21: lconst_0
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
astore 6
22: aload 0
aload 10
aload 6
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
23: StackMap locals: java.util.HashMap java.util.ArrayList long java.lang.Long java.util.Iterator java.lang.Long org.jruby.ir.interpreter.Profiler$CallSiteProfile org.jruby.ir.interpreter.Profiler$IRCallSite java.util.Set org.jruby.ir.IRScope java.util.Iterator
StackMap stack:
aload 7
getfield org.jruby.ir.interpreter.Profiler$CallSiteProfile.counters:Ljava/util/HashMap;
aload 10
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.ir.Counter
getfield org.jruby.ir.Counter.count:J
lstore 12
start local 12 24: aload 6
invokevirtual java.lang.Long.longValue:()J
lload 12
ladd
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
astore 6
25: aload 8
dup
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.count:J
lload 12
ladd
putfield org.jruby.ir.interpreter.Profiler$IRCallSite.count:J
end local 12 end local 10 end local 6 26: StackMap locals: java.util.HashMap java.util.ArrayList long java.lang.Long java.util.Iterator top org.jruby.ir.interpreter.Profiler$CallSiteProfile org.jruby.ir.interpreter.Profiler$IRCallSite java.util.Set top java.util.Iterator
StackMap stack:
aload 11
invokeinterface java.util.Iterator.hasNext:()Z
ifne 18
27: aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.call:Lorg/jruby/ir/instructions/CallBase;
astore 10
start local 10 28: aload 9
invokeinterface java.util.Set.size:()I
iconst_1
if_icmpne 37
aload 10
invokevirtual org.jruby.ir.instructions.CallBase.inliningBlocked:()Z
ifne 37
29: aload 10
invokevirtual org.jruby.ir.instructions.CallBase.getCallSite:()Lorg/jruby/runtime/CallSite;
astore 11
start local 11 30: aload 11
ifnull 37
aload 11
instanceof org.jruby.runtime.callsite.CachingCallSite
ifeq 37
31: aload 11
checkcast org.jruby.runtime.callsite.CachingCallSite
astore 12
start local 12 32: aload 12
invokevirtual org.jruby.runtime.callsite.CachingCallSite.getCache:()Lorg/jruby/runtime/callsite/CacheEntry;
astore 13
start local 13 33: aload 13
getfield org.jruby.runtime.callsite.CacheEntry.method:Lorg/jruby/internal/runtime/methods/DynamicMethod;
instanceof org.jruby.internal.runtime.methods.MixedModeIRMethod
ifne 35
34: goto 38
35: StackMap locals: java.util.HashMap java.util.ArrayList long java.lang.Long java.util.Iterator top org.jruby.ir.interpreter.Profiler$CallSiteProfile org.jruby.ir.interpreter.Profiler$IRCallSite java.util.Set org.jruby.ir.instructions.CallBase org.jruby.runtime.CallSite org.jruby.runtime.callsite.CachingCallSite org.jruby.runtime.callsite.CacheEntry
StackMap stack:
aload 1
aload 8
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
36: aload 8
aload 13
getfield org.jruby.runtime.callsite.CacheEntry.method:Lorg/jruby/internal/runtime/methods/DynamicMethod;
checkcast org.jruby.internal.runtime.methods.MixedModeIRMethod
putfield org.jruby.ir.interpreter.Profiler$IRCallSite.tgtM:Lorg/jruby/internal/runtime/methods/MixedModeIRMethod;
end local 13 end local 12 end local 11 37: StackMap locals:
StackMap stack:
lload 2
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.count:J
ladd
lstore 2
end local 10 end local 9 end local 8 end local 7 end local 4 38: StackMap locals: java.util.HashMap java.util.ArrayList long top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 9
39: aload 1
new org.jruby.ir.interpreter.Profiler$1
dup
invokespecial org.jruby.ir.interpreter.Profiler$1.<init>:()V
invokestatic java.util.Collections.sort:(Ljava/util/List;Ljava/util/Comparator;)V
40: dconst_0
dstore 4
start local 4 41: iconst_0
istore 6
start local 6 42: new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
astore 7
start local 7 43: aload 1
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 9
goto 76
StackMap locals: java.util.HashMap java.util.ArrayList long double int java.util.Set top java.util.Iterator
StackMap stack:
44: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.interpreter.Profiler$IRCallSite
astore 8
start local 8 45: aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.count:J
l2d
ldc 100.0
dmul
lload 2
l2d
ddiv
dstore 10
start local 10 46: dload 10
dconst_1
dcmpg
ifge 47
goto 77
47: StackMap locals: java.util.HashMap java.util.ArrayList long double int java.util.Set org.jruby.ir.interpreter.Profiler$IRCallSite java.util.Iterator double
StackMap stack:
iinc 6 1
48: dload 4
dload 10
dadd
dstore 4
49: iload 6
bipush 100
if_icmpeq 77
dload 4
ldc 99.0
dcmpl
ifle 50
goto 77
50: StackMap locals:
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Considering: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.call:Lorg/jruby/ir/instructions/CallBase;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " with id: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.call:Lorg/jruby/ir/instructions/CallBase;
getfield org.jruby.ir.instructions.CallBase.callSiteId:J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
51: ldc " in scope "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.s:Lorg/jruby/ir/IRScope;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " with count "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.count:J
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc "; contrib "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
dload 10
invokevirtual java.lang.StringBuilder.append:(D)Ljava/lang/StringBuilder;
ldc "; freq: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
dload 4
invokevirtual java.lang.StringBuilder.append:(D)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
52: invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
53: aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.call:Lorg/jruby/ir/instructions/CallBase;
astore 12
start local 12 54: aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.s:Lorg/jruby/ir/IRScope;
astore 13
start local 13 55: aload 13
instanceof org.jruby.ir.IRClosure
istore 14
start local 14 56: iload 14
ifeq 57
aload 13
goto 58
StackMap locals: org.jruby.ir.instructions.CallBase org.jruby.ir.IRScope int
StackMap stack:
57: aconst_null
StackMap locals:
StackMap stack: org.jruby.ir.IRScope
58: astore 15
start local 15 59: iload 14
ifeq 60
aload 13
invokevirtual org.jruby.ir.IRScope.getLexicalParent:()Lorg/jruby/ir/IRScope;
goto 61
StackMap locals: org.jruby.ir.IRScope
StackMap stack:
60: aload 13
StackMap locals:
StackMap stack: org.jruby.ir.IRScope
61: astore 13
62: aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.tgtM:Lorg/jruby/internal/runtime/methods/MixedModeIRMethod;
invokevirtual org.jruby.internal.runtime.methods.MixedModeIRMethod.getIRScope:()Lorg/jruby/ir/IRScope;
astore 16
start local 16 63: aload 16
invokevirtual org.jruby.ir.IRScope.getInterpreterContext:()Lorg/jruby/ir/interpreter/InterpreterContext;
invokevirtual org.jruby.ir.interpreter.InterpreterContext.getInstructions:()[Lorg/jruby/ir/instructions/Instr;
astore 17
start local 17 64: aload 17
ifnull 65
aload 17
arraylength
sipush 500
if_icmple 68
65: StackMap locals: org.jruby.ir.IRScope org.jruby.ir.instructions.Instr[]
StackMap stack:
aload 17
ifnonnull 66
getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "no instrs!"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
goto 76
66: StackMap locals:
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "large method with "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 17
arraylength
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " instrs. skipping!"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
67: goto 76
68: StackMap locals:
StackMap stack:
aload 8
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.tgtM:Lorg/jruby/internal/runtime/methods/MixedModeIRMethod;
invokevirtual org.jruby.internal.runtime.methods.MixedModeIRMethod.getImplementationClass:()Lorg/jruby/RubyModule;
astore 18
start local 18 69: aload 18
invokevirtual org.jruby.RubyModule.getGeneration:()I
pop
70: aload 16
invokevirtual org.jruby.ir.IRScope.getId:()Ljava/lang/String;
pop
71: iload 14
ifeq 76
72: aload 12
aconst_null
invokevirtual org.jruby.ir.instructions.CallBase.getClosureArg:(Lorg/jruby/ir/operands/Operand;)Lorg/jruby/ir/operands/Operand;
astore 19
start local 19 73: aload 19
instanceof org.jruby.ir.operands.WrappedIRClosure
ifeq 74
aload 19
checkcast org.jruby.ir.operands.WrappedIRClosure
invokevirtual org.jruby.ir.operands.WrappedIRClosure.getClosure:()Lorg/jruby/ir/IRClosure;
aload 15
if_acmpne 74
iconst_1
goto 75
StackMap locals: org.jruby.RubyModule org.jruby.ir.operands.Operand
StackMap stack:
74: iconst_0
StackMap locals:
StackMap stack: int
75: pop
end local 19 end local 18 end local 17 end local 16 end local 15 end local 14 end local 13 end local 12 end local 10 end local 8 76: StackMap locals: java.util.HashMap java.util.ArrayList long double int java.util.Set top java.util.Iterator
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 44
77: StackMap locals: java.util.HashMap java.util.ArrayList long double int java.util.Set
StackMap stack:
aload 7
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 9
goto 80
StackMap locals: java.util.HashMap java.util.ArrayList long double int java.util.Set top java.util.Iterator
StackMap stack:
78: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.IRScope
astore 8
start local 8 79: getstatic org.jruby.ir.interpreter.Profiler.scopeVersionMap:Ljava/util/HashMap;
aload 8
getstatic org.jruby.ir.interpreter.Profiler.versionCount:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 8 80: StackMap locals:
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 78
81: iconst_0
putstatic org.jruby.ir.interpreter.Profiler.codeModificationsCount:I
82: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic org.jruby.ir.interpreter.Profiler.callProfile:Ljava/util/HashMap;
83: getstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
ldc 1000000
irem
ifne 85
84: iconst_0
putstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
85: StackMap locals: java.util.HashMap java.util.ArrayList long double int java.util.Set
StackMap stack:
return
end local 7 end local 6 end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
6 86 0 scopeCounts Ljava/util/HashMap<Lorg/jruby/ir/IRScope;Ljava/lang/Long;>;
7 86 1 callSites Ljava/util/ArrayList<Lorg/jruby/ir/interpreter/Profiler$IRCallSite;>;
8 86 2 total J
10 38 4 id Ljava/lang/Long;
20 26 6 c Ljava/lang/Long;
11 38 7 csp Lorg/jruby/ir/interpreter/Profiler$CallSiteProfile;
12 38 8 cs Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
16 38 9 calledScopes Ljava/util/Set<Lorg/jruby/ir/IRScope;>;
19 26 10 s Lorg/jruby/ir/IRScope;
24 26 12 x J
28 38 10 call Lorg/jruby/ir/instructions/CallBase;
30 37 11 runtimeCS Lorg/jruby/runtime/CallSite;
32 37 12 ccs Lorg/jruby/runtime/callsite/CachingCallSite;
33 37 13 ce Lorg/jruby/runtime/callsite/CacheEntry;
41 86 4 freq D
42 86 6 i I
43 86 7 inlinedScopes Ljava/util/Set<Lorg/jruby/ir/IRScope;>;
45 76 8 ircs Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
46 76 10 contrib D
54 76 12 call Lorg/jruby/ir/instructions/CallBase;
55 76 13 hs Lorg/jruby/ir/IRScope;
56 76 14 isHotClosure Z
59 76 15 hc Lorg/jruby/ir/IRScope;
63 76 16 tgtMethod Lorg/jruby/ir/IRScope;
64 76 17 instrs [Lorg/jruby/ir/instructions/Instr;
69 76 18 implClass Lorg/jruby/RubyModule;
73 76 19 clArg Lorg/jruby/ir/operands/Operand;
79 80 8 x Lorg/jruby/ir/IRScope;
private static void outputProfileStats();
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=8, args_size=0
0: new java.util.ArrayList
dup
getstatic org.jruby.ir.interpreter.Profiler.scopeThreadPollCounts:Ljava/util/HashMap;
invokevirtual java.util.HashMap.keySet:()Ljava/util/Set;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
astore 0
start local 0 1: iconst_0
istore 1
start local 1 2: fconst_0
fstore 2
start local 2 3: aload 0
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 4
goto 13
StackMap locals: java.util.ArrayList int float top java.util.Iterator
StackMap stack:
4: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.jruby.ir.IRScope
astore 3
start local 3 5: getstatic org.jruby.ir.interpreter.Profiler.scopeThreadPollCounts:Ljava/util/HashMap;
aload 3
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.ir.Counter
getfield org.jruby.ir.Counter.count:J
lstore 5
start local 5 6: lload 5
ldc 1000
lmul
getstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
i2l
ldiv
l2f
ldc 10.0
fdiv
fstore 7
start local 7 7: new java.lang.StringBuilder
dup
iload 1
invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ". "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " [file:"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual org.jruby.ir.IRScope.getFile:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ":"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual org.jruby.ir.IRScope.getLine:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "] = "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
lload 5
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
ldc "; ("
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
fload 7
invokevirtual java.lang.StringBuilder.append:(F)Ljava/lang/StringBuilder;
ldc "%)"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
pop
8: aload 3
instanceof org.jruby.ir.IRClosure
ifeq 10
9: aload 3
invokevirtual org.jruby.ir.IRScope.getNearestMethod:()Lorg/jruby/ir/IRMethod;
pop
10: StackMap locals: java.util.ArrayList int float org.jruby.ir.IRScope java.util.Iterator long float
StackMap stack:
iinc 1 1
11: fload 2
fload 7
fadd
fstore 2
12: iload 1
bipush 20
if_icmpeq 14
fload 2
f2d
ldc 95.0
dcmpl
iflt 13
goto 14
end local 7 end local 5 end local 3 13: StackMap locals: java.util.ArrayList int float top java.util.Iterator
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
14: StackMap locals: java.util.ArrayList int float
StackMap stack:
iconst_0
putstatic org.jruby.ir.interpreter.Profiler.codeModificationsCount:I
15: getstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
ldc 1000000
irem
ifne 18
16: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putstatic org.jruby.ir.interpreter.Profiler.scopeThreadPollCounts:Ljava/util/HashMap;
17: iconst_0
putstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
18: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 19 0 scopes Ljava/util/ArrayList<Lorg/jruby/ir/IRScope;>;
2 19 1 i I
3 19 2 f1 F
5 13 3 s Lorg/jruby/ir/IRScope;
6 13 5 n J
7 13 7 p1 F
public static java.lang.Integer initProfiling(org.jruby.ir.IRScope);
descriptor: (Lorg/jruby/ir/IRScope;)Ljava/lang/Integer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=5, args_size=1
start local 0 0: aload 0
ifnonnull 1
aconst_null
areturn
1: StackMap locals:
StackMap stack:
getstatic org.jruby.ir.interpreter.Profiler.scopeVersionMap:Ljava/util/HashMap;
aload 0
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Integer
astore 1
start local 1 2: aload 1
ifnonnull 5
3: getstatic org.jruby.ir.interpreter.Profiler.scopeVersionMap:Ljava/util/HashMap;
aload 0
getstatic org.jruby.ir.interpreter.Profiler.versionCount:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: new java.lang.Integer
dup
getstatic org.jruby.ir.interpreter.Profiler.versionCount:I
invokespecial java.lang.Integer.<init>:(I)V
astore 1
5: StackMap locals: java.lang.Integer
StackMap stack:
getstatic org.jruby.ir.interpreter.Profiler.callerSite:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.call:Lorg/jruby/ir/instructions/CallBase;
ifnull 16
6: getstatic org.jruby.ir.interpreter.Profiler.callerSite:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
getfield org.jruby.ir.interpreter.Profiler$IRCallSite.call:Lorg/jruby/ir/instructions/CallBase;
getfield org.jruby.ir.instructions.CallBase.callSiteId:J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
astore 2
start local 2 7: getstatic org.jruby.ir.interpreter.Profiler.callProfile:Ljava/util/HashMap;
aload 2
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.ir.interpreter.Profiler$CallSiteProfile
astore 3
start local 3 8: aload 3
ifnonnull 11
9: new org.jruby.ir.interpreter.Profiler$CallSiteProfile
dup
getstatic org.jruby.ir.interpreter.Profiler.callerSite:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
invokespecial org.jruby.ir.interpreter.Profiler$CallSiteProfile.<init>:(Lorg/jruby/ir/interpreter/Profiler$IRCallSite;)V
astore 3
10: getstatic org.jruby.ir.interpreter.Profiler.callProfile:Ljava/util/HashMap;
aload 2
aload 3
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
11: StackMap locals: java.lang.Long org.jruby.ir.interpreter.Profiler$CallSiteProfile
StackMap stack:
aload 3
getfield org.jruby.ir.interpreter.Profiler$CallSiteProfile.counters:Ljava/util/HashMap;
aload 0
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.jruby.ir.Counter
astore 4
start local 4 12: aload 4
ifnonnull 15
13: new org.jruby.ir.Counter
dup
invokespecial org.jruby.ir.Counter.<init>:()V
astore 4
14: aload 3
getfield org.jruby.ir.interpreter.Profiler$CallSiteProfile.counters:Ljava/util/HashMap;
aload 0
aload 4
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
15: StackMap locals: org.jruby.ir.Counter
StackMap stack:
aload 4
dup
getfield org.jruby.ir.Counter.count:J
lconst_1
ladd
putfield org.jruby.ir.Counter.count:J
end local 4 end local 3 end local 2 16: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 scope Lorg/jruby/ir/IRScope;
2 17 1 scopeVersion Ljava/lang/Integer;
7 16 2 id Ljava/lang/Long;
8 16 3 csp Lorg/jruby/ir/interpreter/Profiler$CallSiteProfile;
12 16 4 csCount Lorg/jruby/ir/Counter;
MethodParameters:
Name Flags
scope
public static void updateCallSite(org.jruby.ir.instructions.Instr, org.jruby.ir.IRScope, java.lang.Integer);
descriptor: (Lorg/jruby/ir/instructions/Instr;Lorg/jruby/ir/IRScope;Ljava/lang/Integer;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ifnonnull 1
return
1: StackMap locals:
StackMap stack:
aload 0
instanceof org.jruby.ir.instructions.CallBase
ifeq 5
2: getstatic org.jruby.ir.interpreter.Profiler.callerSite:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
aload 1
putfield org.jruby.ir.interpreter.Profiler$IRCallSite.s:Lorg/jruby/ir/IRScope;
3: getstatic org.jruby.ir.interpreter.Profiler.callerSite:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
aload 2
invokevirtual java.lang.Integer.intValue:()I
putfield org.jruby.ir.interpreter.Profiler$IRCallSite.v:I
4: getstatic org.jruby.ir.interpreter.Profiler.callerSite:Lorg/jruby/ir/interpreter/Profiler$IRCallSite;
aload 0
checkcast org.jruby.ir.instructions.CallBase
putfield org.jruby.ir.interpreter.Profiler$IRCallSite.call:Lorg/jruby/ir/instructions/CallBase;
5: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 instr Lorg/jruby/ir/instructions/Instr;
0 6 1 scope Lorg/jruby/ir/IRScope;
0 6 2 scopeVersion Ljava/lang/Integer;
MethodParameters:
Name Flags
instr
scope
scopeVersion
public static void clockTick();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: getstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
iconst_1
iadd
putstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
1: getstatic org.jruby.ir.interpreter.Profiler.globalThreadPollCount:I
sipush 20000
irem
ifne 3
2: invokestatic org.jruby.ir.interpreter.Profiler.analyzeProfile:()V
3: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
public static void instrTick(org.jruby.ir.Operation);
descriptor: (Lorg/jruby/ir/Operation;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokevirtual org.jruby.ir.Operation.modifiesCode:()Z
ifeq 1
getstatic org.jruby.ir.interpreter.Profiler.codeModificationsCount:I
iconst_1
iadd
putstatic org.jruby.ir.interpreter.Profiler.codeModificationsCount:I
1: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 operation Lorg/jruby/ir/Operation;
MethodParameters:
Name Flags
operation
}
SourceFile: "Profiler.java"
NestMembers:
org.jruby.ir.interpreter.Profiler$1 org.jruby.ir.interpreter.Profiler$CallSiteProfile org.jruby.ir.interpreter.Profiler$IRCallSite
InnerClasses:
org.jruby.ir.interpreter.Profiler$1
private CallSiteProfile = org.jruby.ir.interpreter.Profiler$CallSiteProfile of org.jruby.ir.interpreter.Profiler
private IRCallSite = org.jruby.ir.interpreter.Profiler$IRCallSite of org.jruby.ir.interpreter.Profiler