Search in sources :

Example 1 with Organizer

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());
    }
}
Also used : Organizer(org.jikesrvm.adaptive.measurements.organizers.Organizer)

Example 2 with Organizer

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();
    }
}
Also used : MethodSampleOrganizer(org.jikesrvm.adaptive.measurements.organizers.MethodSampleOrganizer) AccumulatingMethodSampleOrganizer(org.jikesrvm.adaptive.measurements.organizers.AccumulatingMethodSampleOrganizer) YieldCounterListener(org.jikesrvm.adaptive.measurements.listeners.YieldCounterListener) DynamicCallGraphOrganizer(org.jikesrvm.adaptive.measurements.organizers.DynamicCallGraphOrganizer) MethodSampleOrganizer(org.jikesrvm.adaptive.measurements.organizers.MethodSampleOrganizer) AccumulatingMethodSampleOrganizer(org.jikesrvm.adaptive.measurements.organizers.AccumulatingMethodSampleOrganizer) Organizer(org.jikesrvm.adaptive.measurements.organizers.Organizer) DecayOrganizer(org.jikesrvm.adaptive.measurements.organizers.DecayOrganizer) MethodCountData(org.jikesrvm.adaptive.database.methodsamples.MethodCountData) AOSOptions(org.jikesrvm.adaptive.util.AOSOptions) DecayOrganizer(org.jikesrvm.adaptive.measurements.organizers.DecayOrganizer) OSROrganizerThread(org.jikesrvm.adaptive.OSROrganizerThread)

Example 3 with Organizer

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");
    }
}
Also used : DynamicCallGraphOrganizer(org.jikesrvm.adaptive.measurements.organizers.DynamicCallGraphOrganizer) MethodSampleOrganizer(org.jikesrvm.adaptive.measurements.organizers.MethodSampleOrganizer) AccumulatingMethodSampleOrganizer(org.jikesrvm.adaptive.measurements.organizers.AccumulatingMethodSampleOrganizer) Organizer(org.jikesrvm.adaptive.measurements.organizers.Organizer) DecayOrganizer(org.jikesrvm.adaptive.measurements.organizers.DecayOrganizer)

Example 4 with Organizer

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();
}
Also used : Organizer(org.jikesrvm.adaptive.measurements.organizers.Organizer)

Aggregations

Organizer (org.jikesrvm.adaptive.measurements.organizers.Organizer)4 AccumulatingMethodSampleOrganizer (org.jikesrvm.adaptive.measurements.organizers.AccumulatingMethodSampleOrganizer)2 DecayOrganizer (org.jikesrvm.adaptive.measurements.organizers.DecayOrganizer)2 DynamicCallGraphOrganizer (org.jikesrvm.adaptive.measurements.organizers.DynamicCallGraphOrganizer)2 MethodSampleOrganizer (org.jikesrvm.adaptive.measurements.organizers.MethodSampleOrganizer)2 OSROrganizerThread (org.jikesrvm.adaptive.OSROrganizerThread)1 MethodCountData (org.jikesrvm.adaptive.database.methodsamples.MethodCountData)1 YieldCounterListener (org.jikesrvm.adaptive.measurements.listeners.YieldCounterListener)1 AOSOptions (org.jikesrvm.adaptive.util.AOSOptions)1