Search in sources :

Example 1 with MethodCountData

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();
    }
}
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 2 with MethodCountData

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");
    }
}
Also used : MethodCountData(org.jikesrvm.adaptive.database.methodsamples.MethodCountData) MethodListener(org.jikesrvm.adaptive.measurements.listeners.MethodListener)

Aggregations

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