if (primary && timer != null) timer.stop();
if (perMutator) { if (logDetails) Log.writeln("  per-mutator...");  MutatorContext mutator = null; while ((mutator = ActivePlan.getNextMutator()) != null) { mutator.collectionPhase(id, primary); } Collection.rendezvous(4000 + id); if (primary) { ActivePlan.resetMutatorIterator(); } Collection.rendezvous(4500 + id); }  if (globalLast) { if (logDetails) Log.writeln("  global..."); if (primary) plan.collectionPhase(id); Collection.rendezvous(5000 + id); }  if (primary && timer != null) timer.stop();
  protected final void delegatePhase() throws NoInlinePragma {    boolean log = Options.verbose.getValue() >= 6;    boolean logDetails = Options.verbose.getValue() >= 7;    if (log) {      Log.write("SimplePhase.delegatePhase ");      logPhase();    }    if (placeholder) return;    Plan plan = ActivePlan.global();		CollectorContext collector = ActivePlan.collector();    /*     * Synchronize at the start, and choose one CPU as the primary,     * to perform global tasks.     */    int order = Collection.rendezvous(1000 + id);    final boolean primary = order == 1;    if (primary && timer != null) timer.start();    if (globalFirst) { // Phase has a global component, executed first      if (logDetails) Log.writeln("  global...");      if (primary) plan.collectionPhase(id);      Collection.rendezvous(2000 + id);    }		if (perCollector) { // Phase has a per-collector component			if (logDetails) Log.writeln("  per-collector...");			collector.collectionPhase(id, true, primary);			Collection.rendezvous(3000 + id);          }				if (perMutator) {   // Phase has a per-mutator component			if (logDetails) Log.writeln("  per-mutator...");			/* iterate through all mutator contexts, worker-farmer */			MutatorContext mutator = null;			while((mutator = ActivePlan.getNextMutator()) != null) {				mutator.collectionPhase(id, true, primary);        }			Collection.rendezvous(4000 + id);			if (primary) {				ActivePlan.resetMutatorIterator();			}			Collection.rendezvous(4500 + id);      }    if (globalLast) {  // Phase has a global component, executed last      if (logDetails) Log.writeln("  global...");      if (primary) plan.collectionPhase(id);			Collection.rendezvous(5000 + id);    }    if (primary && timer != null) timer.stop();  }