}  if ((VM_Controller.options.ENABLE_REPLAY_COMPILE) ||(VM_Controller.options.ENABLE_PRECOMPILE)) {   VM_Controller.options.MAX_OPT_LEVEL = 2; if (VM_Controller.options.sampling()) {  VM_Controller.recompilationStrategy.init(); } else if (VM_Controller.options.counters()) { VM_InvocationCounts.init(); }  VM_Controller.osrOrganizer = new OSR_OrganizerThread(); VM_Controller.osrOrganizer.start();  createCompilationThread();    controllerInitDone();   createOrganizerThreads(); VM.sysWrite("\nAOS: In replay mode; controller thread only runs for OSR inlining.\n"); while (true) { if (VM_Controller.options.EARLY_EXIT && VM_Controller.options.EARLY_EXIT_TIME < VM_Controller.controllerClock) { VM_Controller.stop(); } Object event = VM_Controller.controllerInputQueue.deleteMin(); ((OSR_OnStackReplacementEvent)event).process(); }
  public void run() {    // save this object so others can access it, if needed    VM_Controller.controllerThread = this;    // Bring up the logging system    if (VM.LogAOSEvents) VM_AOSLogging.boot();    if (VM.LogAOSEvents) VM_AOSLogging.controllerStarted();    // Create measurement entities that are NOT related to     // adaptive recompilation    createProfilers();    if (!VM_Controller.options.ENABLE_RECOMPILATION) {      // We're running an AOS bootimage with a non-adaptive primary strategy.       // We already set up any requested profiling infrastructure, so nothing      // left to do but exit.      controllerInitDone();      VM.sysWrite("\nAOS: In non-adaptive mode; controller thread exiting.\n");      return; // controller thread exits.    }    // Initialize the CompilerDNA class    // This computes some internal options, must be done early in boot process    VM_CompilerDNA.init();    // Create the organizerThreads and schedule them    createOrganizerThreads();    // Create the compilationThread and schedule it    createCompilationThread();    if (VM_Controller.options.sampling()) {      // Create our set of standard optimization plans.      VM_Controller.recompilationStrategy.init();    } else if (VM_Controller.options.counters()) {      VM_InvocationCounts.init();    }    controllerInitDone();    // Enter main controller loop.    // Pull an event to process off of     // VM_Controller.controllerInputQueue and handle it.      // If no events are on the queue, then the deleteMin call will     // block until an event is available.    // Repeat forever.    while (true) {      if (VM_Controller.options.EARLY_EXIT &&          VM_Controller.options.EARLY_EXIT_TIME < VM_Controller.controllerClock) {        VM_Controller.stop();      }      Object event = VM_Controller.controllerInputQueue.deleteMin();      ((VM_ControllerInputEvent)event).process();    }  }