changeset 8505:dee7c8b578c7

-Integration of WB Serial Snippets-Integration of G1 WB Snippets (partially working)-Fix allocation bug with -XX:-UseTLAB and -XX:+UseSerialGC
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Thu, 21 Mar 2013 11:30:38 +0100
parents 86b4965f0c9a
children c3657d00e343
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java mx/sanitycheck.py src/share/vm/gc_implementation/g1/g1AllocRegion.hpp src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
diffstat 6 files changed, 38 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Wed Mar 20 21:39:24 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java	Thu Mar 21 11:30:38 2013 +0100
@@ -30,9 +30,11 @@
 import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.debug.internal.*;
+import com.oracle.graal.graph.*;
 import com.oracle.graal.hotspot.meta.*;
 import com.oracle.graal.nodes.*;
 import com.oracle.graal.phases.*;
+import static com.oracle.graal.nodes.StructuredGraph.*;
 
 public final class CompilationTask implements Runnable, Comparable<CompilationTask> {
 
@@ -135,14 +137,14 @@
                     @Override
                     public CompilationResult call() throws Exception {
                         graalRuntime.evictDeoptedGraphs();
-// StructuredGraph graph = (StructuredGraph) method.getCompilerStorage().get(Graph.class);
-// if (graph == null || entryBCI != INVOCATION_ENTRY_BCI) {
-                        StructuredGraph graph = new StructuredGraph(method, entryBCI);
-// } else {
-// // Compiling an intrinsic graph - must clone the graph
-// graph = graph.copy();
-// // System.out.println("compiling intrinsic " + method);
-// }
+                        StructuredGraph graph = (StructuredGraph) method.getCompilerStorage().get(Graph.class);
+                        if (graph == null || entryBCI != INVOCATION_ENTRY_BCI) {
+                            graph = new StructuredGraph(method, entryBCI);
+                        } else {
+                            // Compiling an intrinsic graph - must clone the graph
+                            graph = graph.copy();
+                            // System.out.println("compiling intrinsic " + method);
+                        }
                         InlinedBytecodes.add(method.getCodeSize());
                         return graalRuntime.getCompiler().compileMethod(method, graph, graalRuntime.getCache(), plan, optimisticOpts);
                     }
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java	Wed Mar 20 21:39:24 2013 +0100
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java	Thu Mar 21 11:30:38 2013 +0100
@@ -198,7 +198,7 @@
 
     // Intrinsification settings
     public static boolean IntrinsifyObjectClone              = ____;
-    public static boolean IntrinsifyArrayCopy                = false;
+    public static boolean IntrinsifyArrayCopy                = true;
     public static boolean IntrinsifyObjectMethods            = true;
     public static boolean IntrinsifySystemMethods            = true;
     public static boolean IntrinsifyClassMethods             = true;
--- a/mx/sanitycheck.py	Wed Mar 20 21:39:24 2013 +0100
+++ b/mx/sanitycheck.py	Thu Mar 21 11:30:38 2013 +0100
@@ -27,7 +27,7 @@
 import re, mx, commands, os, sys, StringIO, subprocess
 from os.path import isfile, join, exists
 
-gc='UseG1GC'
+gc='UseSerialGC'
 
 dacapoSanityWarmup = {
     'avrora':     [0, 0,  3,  6, 13],
--- a/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp	Wed Mar 20 21:39:24 2013 +0100
+++ b/src/share/vm/gc_implementation/g1/g1AllocRegion.hpp	Thu Mar 21 11:30:38 2013 +0100
@@ -173,8 +173,17 @@
   // Should be called when we want to release the active region which
   // is returned after it's been retired.
   HeapRegion* release();
+#ifdef GRAAL
+  HeapWord** top_addr()  const {
+    return _alloc_region->top_addr();
+  }
 
-#if G1_ALLOC_REGION_TRACING
+  HeapWord** end_addr()  const {
+    return _alloc_region->end_addr();
+  }
+#endif
+
+  #if G1_ALLOC_REGION_TRACING
   void trace(const char* str, size_t word_size = 0, HeapWord* result = NULL);
 #else // G1_ALLOC_REGION_TRACING
   void trace(const char* str, size_t word_size = 0, HeapWord* result = NULL) { }
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Mar 20 21:39:24 2013 +0100
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Mar 21 11:30:38 2013 +0100
@@ -2398,6 +2398,16 @@
 }
 #endif // !PRODUCT
 
+#ifdef GRAAL
+HeapWord** G1CollectedHeap::top_addr() const {
+  return _mutator_alloc_region.top_addr();
+}
+
+HeapWord** G1CollectedHeap::end_addr()  const {
+  return  _mutator_alloc_region.end_addr();
+}
+#endif
+
 void G1CollectedHeap::increment_old_marking_cycles_started() {
   assert(_old_marking_cycles_started == _old_marking_cycles_completed ||
     _old_marking_cycles_started == _old_marking_cycles_completed + 1,
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Wed Mar 20 21:39:24 2013 +0100
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Thu Mar 21 11:30:38 2013 +0100
@@ -675,6 +675,12 @@
   virtual void gc_prologue(bool full);
   virtual void gc_epilogue(bool full);
 
+  #ifdef GRAAL
+    HeapWord** top_addr() const;
+    HeapWord** end_addr() const;
+
+  #endif
+
   // We register a region with the fast "in collection set" test. We
   // simply set to true the array slot corresponding to this region.
   void register_region_with_in_cset_fast_test(HeapRegion* r) {