use of org.jikesrvm.adaptive.database.methodsamples.MethodCountData in project JikesRVM by JikesRVM.
the class ControllerThread method createOrganizerThreads.
/**
* Create the organizerThreads and schedule them
*/
private void createOrganizerThreads() {
AOSOptions opts = Controller.options;
if (opts.sampling()) {
// Primary backing store for method sample data
Controller.methodSamples = new MethodCountData();
// Install organizer to drive method recompilation
Controller.organizers.add(new MethodSampleOrganizer(opts.DERIVED_FILTER_OPT_LEVEL));
// Additional set up for feedback directed inlining
if (opts.ADAPTIVE_INLINING) {
Organizer decayOrganizer = new DecayOrganizer(new YieldCounterListener(opts.DECAY_FREQUENCY));
Controller.organizers.add(decayOrganizer);
createDynamicCallGraphOrganizer();
}
}
if ((!opts.ENABLE_PRECOMPILE) && (!opts.ENABLE_BULK_COMPILE)) {
Controller.osrOrganizer = new OSROrganizerThread();
Controller.osrOrganizer.start();
}
}
use of org.jikesrvm.adaptive.database.methodsamples.MethodCountData in project JikesRVM by JikesRVM.
the class AccumulatingMethodSampleOrganizer method initialize.
/**
* Initialization: set up data structures and sampling objects.
* <p>
* Uses either timer based sampling or counter based sampling,
* depending on {@link Controller#options}.
*/
@Override
public void initialize() {
data = new MethodCountData();
new AsyncReporter().start();
int numSamples = Controller.options.METHOD_SAMPLE_SIZE * RVMThread.availableProcessors;
if (Controller.options.mlCBS()) {
numSamples *= VM.CBSMethodSamplesPerTick;
}
MethodListener methodListener = new MethodListener(numSamples);
listener = methodListener;
listener.setOrganizer(this);
if (Controller.options.mlTimer()) {
RuntimeMeasurements.installTimerMethodListener(methodListener);
} else if (Controller.options.mlCBS()) {
RuntimeMeasurements.installCBSMethodListener(methodListener);
} else {
if (VM.VerifyAssertions)
VM._assert(VM.NOT_REACHED, "Unexpected value of method_listener_trigger");
}
}
Aggregations