|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.scheduler.SystemThread org.jikesrvm.adaptive.measurements.organizers.Organizer org.jikesrvm.adaptive.measurements.organizers.DynamicCallGraphOrganizer
public class DynamicCallGraphOrganizer
An organizer to build a dynamic call graph from call graph edge samples.
It communicates with an edge listener through a integer array, denoted buffer. When this organizer is woken up via threshold reached, it processes the sequence of triples that are contained in buffer.
After processing the buffer and updating the dynamic call graph, it optionally notifies the AdaptiveInliningOrganizer who is responsible for analyzing the dynamic call graph for the purposes of feedback-directed inlining.
Note: Since this information is intended to drive feedback-directed inlining, the organizer drops edges that are not relevant. For example, one of the methods is a native method, or the callee is a runtime service routine and thus can't be inlined into its caller even if it is reported as hot. Thus, the call graph may not contain some hot edges since they aren't viable inlining candidates. One may argue that this is not the right design. Perhaps instead the edges should be present for profiling purposes, but not reported as inlining candidates to the
EXPECTATION: buffer is filled all the way up with triples.
Field Summary | |
---|---|
private int[] |
buffer
buffer provides the communication channel between the edge listener and the organizer. |
private int |
bufferSize
the buffer's size, i.e. length of buffer |
private static boolean |
DEBUG
|
private int |
numberOfBufferTriples
the maximum number of triples contained in buffer |
private int |
thresholdReachedCount
Countdown of times we have to have called thresholdReached before we believe the call graph has enough samples that it is reasonable to use it to guide profile-directed inlining. |
Fields inherited from class org.jikesrvm.adaptive.measurements.organizers.Organizer |
---|
listener |
Fields inherited from class org.jikesrvm.scheduler.SystemThread |
---|
rvmThread |
Constructor Summary | |
---|---|
DynamicCallGraphOrganizer(EdgeListener edgeListener)
Constructs a new dynamic call graph organizer that will get its data from the given edge listener. |
Method Summary | |
---|---|
void |
initialize()
Initialization: set up data structures and sampling objects. |
boolean |
someDataAvailable()
Checks if the dynamic call graph organizer has gathered and processed enough samples to support decisions. |
(package private) void |
thresholdReached()
Process contents of buffer: add call graph edges and increment their weights. |
Methods inherited from class org.jikesrvm.adaptive.measurements.organizers.Organizer |
---|
activate, report, run |
Methods inherited from class org.jikesrvm.scheduler.SystemThread |
---|
getRVMThread, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
private int[] buffer
The buffer contains an array of triples <callee, caller, address>
where
the caller and callee are CompiledMethodID's, and address identifies
the call site.
The edge listener adds triples.
At some point the listener deregisters itself and notifies the organizer
by calling thresholdReached().
private int bufferSize
buffer
private int numberOfBufferTriples
private int thresholdReachedCount
Constructor Detail |
---|
public DynamicCallGraphOrganizer(EdgeListener edgeListener)
edgeListener
- the listener that provides data for this organizerMethod Detail |
---|
public void initialize()
Uses either timer based sampling or counter based sampling,
depending on Controller.options
.
initialize
in class Organizer
void thresholdReached()
thresholdReached
in class Organizer
public boolean someDataAvailable()
true
if enough data is available, false
otherwise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |