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 */
013 package org.mmtk.plan.refcount.fullheap;
014
015 import org.mmtk.plan.TransitiveClosure;
016 import org.mmtk.plan.refcount.RCBase;
017 import org.mmtk.plan.refcount.RCHeader;
018
019 import org.vmmagic.pragma.*;
020 import org.vmmagic.unboxed.*;
021
022 /**
023 * This class is the fundamental mechanism for performing a
024 * transitive closure over an object graph.<p>
025 *
026 * @see org.mmtk.plan.TraceLocal
027 */
028 @Uninterruptible
029 public final class RCModifiedProcessor extends TransitiveClosure {
030
031 /**
032 * Trace an edge during GC.
033 *
034 * @param source The source of the reference.
035 * @param slot The location containing the object reference.
036 */
037 @Inline
038 public void processEdge(ObjectReference source, Address slot) {
039 ObjectReference object = slot.loadObjectReference();
040 if (RCBase.isRCObject(object)) {
041 RCHeader.incRC(object);
042 }
043 }
044 }