SF.net SVN: jikesrvm:[15792] rvmroot/branches/RVM-777-NewMMTkGlue/work

View: New views
1 Messages — Rating Filter:   Alert me  

SF.net SVN: jikesrvm:[15792] rvmroot/branches/RVM-777-NewMMTkGlue/work

by dframpton-oss :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Revision: 15792
          http://jikesrvm.svn.sourceforge.net/jikesrvm/?rev=15792&view=rev
Author:   dframpton-oss
Date:     2009-11-05 06:01:07 +0000 (Thu, 05 Nov 2009)

Log Message:
-----------
cleaning up the merge

Added Paths:
-----------
    rvmroot/branches/RVM-777-NewMMTkGlue/work/MMTk/src/org/mmtk/plan/TraceWriteBuffer.java
    rvmroot/branches/RVM-777-NewMMTkGlue/work/libraryInterface/GNUClasspath/EPL/src/java/net/

Removed Paths:
-------------
    rvmroot/branches/RVM-777-NewMMTkGlue/work/libraryInterface/GNUClasspath/CPL/
    rvmroot/branches/RVM-777-NewMMTkGlue/work/libraryInterface/Harmony/CPL/

Added: rvmroot/branches/RVM-777-NewMMTkGlue/work/MMTk/src/org/mmtk/plan/TraceWriteBuffer.java
===================================================================
--- rvmroot/branches/RVM-777-NewMMTkGlue/work/MMTk/src/org/mmtk/plan/TraceWriteBuffer.java                        (rev 0)
+++ rvmroot/branches/RVM-777-NewMMTkGlue/work/MMTk/src/org/mmtk/plan/TraceWriteBuffer.java 2009-11-05 06:01:07 UTC (rev 15792)
@@ -0,0 +1,72 @@
+/*
+ *  This file is part of the Jikes RVM project (http://jikesrvm.org).
+ *
+ *  This file is licensed to You under the Eclipse Public License (EPL);
+ *  You may not use this file except in compliance with the License. You
+ *  may obtain a copy of the License at
+ *
+ *      http://www.opensource.org/licenses/eclipse-1.0.php
+ *
+ *  See the COPYRIGHT.txt file distributed with this work for information
+ *  regarding copyright ownership.
+ */
+package org.mmtk.plan;
+
+import org.mmtk.utility.deque.WriteBuffer;
+import org.vmmagic.pragma.*;
+import org.vmmagic.unboxed.*;
+
+/**
+ * This class is used to push values in one direction during a trace. It
+ * was designed for use in mutators that use write barriers to push
+ * work to collector threads during concurrent tracing.
+ *
+ * @see org.mmtk.plan.TraceLocal
+ */
+@Uninterruptible
+public final class TraceWriteBuffer extends TransitiveClosure {
+  /****************************************************************************
+   *
+   * Instance variables
+   */
+  private final WriteBuffer buffer;
+
+  /****************************************************************************
+   *
+   * Initialization
+   */
+
+  /**
+   * Constructor
+   *
+   * @param trace The global trace class to use.
+   */
+  public TraceWriteBuffer(Trace trace) {
+    buffer = new WriteBuffer(trace.valuePool);
+  }
+
+  /**
+   * Flush the buffer to the trace.
+   */
+  public void flush() {
+    buffer.flushLocal();
+  }
+
+
+  /**
+   * @return True if the buffer is flushed.
+   */
+  public boolean isFlushed() {
+    return buffer.isFlushed();
+  }
+
+  /**
+   * Enqueue an object during a trace.
+   *
+   * @param object The object to enqueue
+   */
+  @Inline
+  public void processNode(ObjectReference object) {
+    buffer.insert(object.toAddress());
+  }
+}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-commits mailing list
Jikesrvm-commits@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-commits