001/* 002 * This file is part of the Jikes RVM project (http://jikesrvm.org). 003 * 004 * This file is licensed to You under the Eclipse Public License (EPL); 005 * You may not use this file except in compliance with the License. You 006 * may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/eclipse-1.0.php 009 * 010 * See the COPYRIGHT.txt file distributed with this work for information 011 * regarding copyright ownership. 012 */ 013package org.mmtk.vm; 014 015import org.mmtk.plan.Plan; 016import org.mmtk.plan.CollectorContext; 017import org.mmtk.plan.MutatorContext; 018import org.mmtk.plan.PlanConstraints; 019 020import org.mmtk.utility.Log; 021 022import org.vmmagic.pragma.*; 023 024/** 025 * Stub to give access to plan local, constraint and global instances 026 */ 027@Uninterruptible public abstract class ActivePlan { 028 029 /** @return The active Plan instance. */ 030 public abstract Plan global(); 031 032 /** @return The active PlanConstraints instance. */ 033 public abstract PlanConstraints constraints(); 034 035 /** @return The active <code>CollectorContext</code> instance. */ 036 public abstract CollectorContext collector(); 037 038 /** @return Is the active thread a mutator thread. */ 039 public abstract boolean isMutator(); 040 041 /** @return The active <code>MutatorContext</code> instance. */ 042 public abstract MutatorContext mutator(); 043 044 /** @return The log for the active thread */ 045 public abstract Log log(); 046 047 /** @return The maximum number of collector threads that may participate in parallel GC. */ 048 public abstract int collectorCount(); 049 050 /** Reset the mutator iterator */ 051 public abstract void resetMutatorIterator(); 052 053 /** 054 * Return the next <code>MutatorContext</code> in a 055 * synchronized iteration of all mutators. 056 * 057 * @return The next <code>MutatorContext</code> in a 058 * synchronized iteration of all mutators, or 059 * <code>null</code> when all mutators have been done. 060 */ 061 public abstract MutatorContext getNextMutator(); 062}