Merge
diff --git a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepThread.hpp b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepThread.hpp
index 807284c..82f9e51 100644
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepThread.hpp
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepThread.hpp
@@ -79,9 +79,6 @@
   static void makeSurrogateLockerThread(TRAPS);
   static SurrogateLockerThread* slt() { return _slt; }
 
-  // Tester
-  bool is_ConcurrentGC_thread() const { return true;       }
-
   static void threads_do(ThreadClosure* tc);
 
   // Printing
diff --git a/hotspot/src/share/vm/gc/g1/g1MMUTracker.hpp b/hotspot/src/share/vm/gc/g1/g1MMUTracker.hpp
index 6edb16b..c8a09af 100644
--- a/hotspot/src/share/vm/gc/g1/g1MMUTracker.hpp
+++ b/hotspot/src/share/vm/gc/g1/g1MMUTracker.hpp
@@ -29,11 +29,23 @@
 #include "memory/allocation.hpp"
 #include "utilities/debug.hpp"
 
-// Keeps track of the GC work and decides when it is OK to do GC work
+// Two major user controls over G1 behavior are setting a pause time goal (MaxGCPauseMillis),
+// over a time slice (GCPauseIntervalMillis). This defines the Minimum Mutator
+// Utilisation (MMU) goal.
+//
+// * Definitions *
+// Mutator Utilisation:
+// - for a given time slice duration "ts",
+// - mutator utilisation is the following fraction:
+//     non_gc_time / ts
+//
+// Minimum Mutator Utilisation (MMU):
+// - the worst mutator utilisation across all time slices.
+//
+// G1MMUTracker keeps track of the GC work and decides when it is OK to do GC work
 // and for how long so that the MMU invariants are maintained.
-
-/***** ALL TIMES ARE IN SECS!!!!!!! *****/
-
+//
+// ***** ALL TIMES ARE IN SECS!!!!!!! *****
 // this is the "interface"
 class G1MMUTracker: public CHeapObj<mtGC> {
 protected:
diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp
index 86b6632..9030b3f 100644
--- a/hotspot/src/share/vm/prims/jni.cpp
+++ b/hotspot/src/share/vm/prims/jni.cpp
@@ -4061,6 +4061,10 @@
     OrderAccess::release_store(&vm_created, 0);
   }
 
+  // Flush stdout and stderr before exit.
+  fflush(stdout);
+  fflush(stderr);
+
   return result;
 
 }
diff --git a/hotspot/src/share/vm/runtime/java.cpp b/hotspot/src/share/vm/runtime/java.cpp
index d1d3d34..35bb768 100644
--- a/hotspot/src/share/vm/runtime/java.cpp
+++ b/hotspot/src/share/vm/runtime/java.cpp
@@ -575,6 +575,11 @@
 void vm_abort(bool dump_core) {
   vm_perform_shutdown_actions();
   os::wait_for_keypress_at_exit();
+
+  // Flush stdout and stderr before abort.
+  fflush(stdout);
+  fflush(stderr);
+
   os::abort(dump_core);
   ShouldNotReachHere();
 }