Class ProfileData
java.lang.Object
org.jruby.runtime.profile.builtin.ProfileData
- All Implemented Interfaces:
ProfileCollection
Encapsulates the logic of recording and reporting profiled timings of
method invocations. This keeps track of aggregate values for callers and
callees of each method.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the gathered profiling (invocation) data.Compute the profiling results from gathered data.protected voiddecRecursionFor(int serial) protected intincRecursionFor(int serial) methodName(int serial) voidprofileEnter(long calledMethod) Begin profiling a new method, aggregating the current time diff in the previous method's profile slot.voidprofileExit(long callingMethod, long startTime) Fall back to previously profiled method after current method has returned.long
-
Constructor Details
-
ProfileData
-
-
Method Details
-
profileEnter
public void profileEnter(long calledMethod) Begin profiling a new method, aggregating the current time diff in the previous method's profile slot.- Specified by:
profileEnterin interfaceProfileCollection- Parameters:
calledMethod- the serial number of the next method to profile
-
profileExit
public void profileExit(long callingMethod, long startTime) Fall back to previously profiled method after current method has returned.- Specified by:
profileExitin interfaceProfileCollection- Parameters:
callingMethod- the serial number of the next method to profilestartTime- the nano timestamp at which the given callingMethod was entered
-
clear
public void clear()Clear the gathered profiling (invocation) data. -
totalTime
public long totalTime() -
getTopInvocation
- Returns:
- the topInvocation
-
getCurrentInvocation
- Returns:
- the currentInvocation
-
getThreadContext
- Returns:
- the threadContext
-
computeResults
Compute the profiling results from gathered data.- Returns:
- the top invocation
-
decRecursionFor
protected void decRecursionFor(int serial) -
incRecursionFor
protected int incRecursionFor(int serial) -
methodName
-