use of org.jikesrvm.adaptive.measurements.organizers.Organizer in project JikesRVM by JikesRVM.
the class Controller method report.
/**
* This method is called when the VM is exiting to provide a hook to allow
* the adaptive optimization subsystem to generate a summary report.
* It can also be called directly from driver programs to allow
* reporting on a single run of a benchmark that the driver program
* is executing in a loop (in which case the adaptive system isn't actually
* exiting.....so some of the log messages may get a little weird).
*/
public static void report() {
if (!booted)
return;
ControllerThread.report();
RuntimeMeasurements.report();
for (Enumeration<Organizer> e = organizers.elements(); e.hasMoreElements(); ) {
Organizer organizer = e.nextElement();
organizer.report();
}
if (options.FINAL_REPORT_LEVEL >= 2) {
EdgeCounts.dumpCounts();
dcg.dumpGraph();
}
if (options.REPORT_INTERRUPT_STATS) {
VM.sysWriteln("Timer Interrupt and Listener Stats");
VM.sysWriteln("\tTotal number of clock ticks ", RVMThread.timerTicks);
VM.sysWriteln("\tController clock ", controllerClock);
VM.sysWriteln("\tNumber of method samples taken ", (int) methodSamples.getTotalNumberOfSamples());
}
}
use of org.jikesrvm.adaptive.measurements.organizers.Organizer 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.measurements.organizers.Organizer in project JikesRVM by JikesRVM.
the class ControllerThread method controllerInitDone.
/**
* Now that the controller is initialized, schedule all the organizer threads
* and signal the sentinel object.
*/
private void controllerInitDone() {
for (Enumeration<Organizer> e = Controller.organizers.elements(); e.hasMoreElements(); ) {
Organizer o = e.nextElement();
o.start();
}
try {
sentinel.open();
} catch (Exception e) {
e.printStackTrace();
VM.sysFail("Failed to start up controller subsystem");
}
}
use of org.jikesrvm.adaptive.measurements.organizers.Organizer in project JikesRVM by JikesRVM.
the class Controller method stop.
/**
* Stop all AOS threads and exit the adaptive system.
* Can be used to assess code quality in a steady state by
* allowing the adaptive system to run "for a while" and then
* stopping it
*/
public static void stop() {
if (!booted)
return;
VM.sysWriteln("AOS: Killing all adaptive system threads");
for (Enumeration<Organizer> e = organizers.elements(); e.hasMoreElements(); ) {
Organizer organizer = e.nextElement();
organizer.stop(threadDeath);
}
compilationThread.stop(threadDeath);
controllerThread.stop(threadDeath);
RuntimeMeasurements.stop();
report();
}
Aggregations