/** 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 (RecompilationDataProvider.ENABLED) {
      RecompilationDataProvider rdp = new RecompilationDataProvider();
      Callbacks.addMethodCompileMonitor(rdp);
      RuntimeMeasurements.registerReportableObject(rdp);
    }

    if (opts.PARAMETER_PROFILING) {
      if (VM.BuildFor32Addr && VM.BuildForIA32 && VM.BuildForLinux) {
        if (opts.PARAMETER_PROFILING_INCLUDE_VM) {
          ParameterListener.enableProfilingOfVMMethods();
        }

        ParameterProfileOrganizer parameterProfileOrganizer = new ParameterProfileOrganizer();
        Controller.organizers.addElement(parameterProfileOrganizer);
      } else {
        VM.sysFail(
            "Trying to use parameter profiling for an untested configuration."
                + "Please modify the source code to support your platform");
      }
    }

    if ((!Controller.options.ENABLE_PRECOMPILE) && (!Controller.options.ENABLE_BULK_COMPILE)) {
      Controller.osrOrganizer = new OSROrganizerThread();
      Controller.osrOrganizer.start();
    }
  }
Пример #2
0
  /** 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.addElement(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.addElement(decayOrganizer);
        createDynamicCallGraphOrganizer();
      }
    }

    if ((!Controller.options.ENABLE_REPLAY_COMPILE) && (!Controller.options.ENABLE_PRECOMPILE)) {
      Controller.osrOrganizer = new OSROrganizerThread();
      Controller.osrOrganizer.start();
    }
  }