Top Inners Fields Constructors Methods
org.jruby.ir.interpreter

public Class Profiler

extends Object
Class Inheritance
Imports
org.jruby.RubyModule, org.jruby.internal.runtime.methods.MixedModeIRMethod, org.jruby.ir.*, org.jruby.ir.instructions.CallBase, .Instr, org.jruby.ir.operands.NullBlock, .Operand, .WrappedIRClosure, org.jruby.runtime.CallSite, org.jruby.runtime.callsite.CacheEntry, .CachingCallSite, java.util.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final Profiler.IRCallSite
private static HashMap<Long, Profiler.CallSiteProfile>
private static int
private static int
private static int
private static int
private static HashMap<Operation, Counter>
private static HashMap<IRScope, Counter>
private static final HashMap<IRScope, Integer>
private static int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
public static void
public static Integer
public static void
instrTick(Operation operation)

private static void
public static void
updateCallSite(Instr instr, IRScope scope, Integer scopeVersion)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

callerSiteback to summary
private static final Profiler.IRCallSite callerSite
callProfileback to summary
private static HashMap<Long, Profiler.CallSiteProfile> callProfile
codeModificationsCountback to summary
private static int codeModificationsCount
globalThreadPollCountback to summary
private static int globalThreadPollCount
inlineCountback to summary
private static int inlineCount
numCyclesWithNoModificationsback to summary
private static int numCyclesWithNoModifications
opStatsback to summary
private static HashMap<Operation, Counter> opStats
scopeThreadPollCountsback to summary
private static HashMap<IRScope, Counter> scopeThreadPollCounts
scopeVersionMapback to summary
private static final HashMap<IRScope, Integer> scopeVersionMap
versionCountback to summary
private static int versionCount

Constructor Detail

Profilerback to summary
public Profiler()

Method Detail

analyzeProfileback to summary
private static void analyzeProfile()
clockTickback to summary
public static void clockTick()
initProfilingback to summary
public static Integer initProfiling(IRScope scope)
instrTickback to summary
public static void instrTick(Operation operation)
outputProfileStatsback to summary
private static void outputProfileStats()
updateCallSiteback to summary
public static void updateCallSite(Instr instr, IRScope scope, Integer scopeVersion)
org.jruby.ir.interpreter back to summary

private Class Profiler.CallSiteProfile

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final HashMap<IRScope, Counter>
pack-priv final Profiler.IRCallSite

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countersback to summary
pack-priv final HashMap<IRScope, Counter> counters
csback to summary
pack-priv final Profiler.IRCallSite cs

Constructor Detail

CallSiteProfileback to summary
public CallSiteProfile(Profiler.IRCallSite cs)
org.jruby.ir.interpreter back to summary

private Class Profiler.IRCallSite

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv CallBase
pack-priv long
pack-priv IRScope
s

pack-priv MixedModeIRMethod
pack-priv int
v

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

callback to summary
pack-priv CallBase call
countback to summary
pack-priv long count
sback to summary
pack-priv IRScope s
tgtMback to summary
pack-priv MixedModeIRMethod tgtM
vback to summary
pack-priv int v

Constructor Detail

IRCallSiteback to summary
public IRCallSite()
IRCallSiteback to summary
public IRCallSite(Profiler.IRCallSite cs)

Method Detail

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object