Merge
authoramurillo
Thu, 21 Jul 2016 19:50:41 -0700
changeset 39996 330c9163d604
parent 39814 e8373543a3f0 (current diff)
parent 39963 5921b7f27d63 (diff)
child 39997 a65e14a0d827
Merge
--- a/hotspot/make/gensrc/GensrcAdlc.gmk	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/make/gensrc/GensrcAdlc.gmk	Thu Jul 21 19:50:41 2016 -0700
@@ -51,6 +51,9 @@
     ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
   endif
 
+  # Set the C++ standard if supported
+  ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
+  
   # NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
   # hurt.
   ADLC_CFLAGS += -DASSERT
--- a/hotspot/src/share/vm/gc/g1/g1YoungGenSizer.cpp	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1YoungGenSizer.cpp	Thu Jul 21 19:50:41 2016 -0700
@@ -45,7 +45,7 @@
                             "A new max generation size of " SIZE_FORMAT "k will be used.",
                             NewSize/K, MaxNewSize/K, NewSize/K);
     }
-    MaxNewSize = NewSize;
+    FLAG_SET_ERGO(size_t, MaxNewSize, NewSize);
   }
 
   if (FLAG_IS_CMDLINE(NewSize)) {
--- a/hotspot/src/share/vm/gc/shared/collectorPolicy.cpp	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectorPolicy.cpp	Thu Jul 21 19:50:41 2016 -0700
@@ -50,7 +50,6 @@
     _initial_heap_byte_size(InitialHeapSize),
     _max_heap_byte_size(MaxHeapSize),
     _min_heap_byte_size(Arguments::min_heap_size()),
-    _max_heap_size_cmdline(false),
     _size_policy(NULL),
     _should_clear_all_soft_refs(false),
     _all_soft_refs_clear(false)
@@ -92,7 +91,6 @@
     if (_min_heap_byte_size != 0 && MaxHeapSize < _min_heap_byte_size) {
       vm_exit_during_initialization("Incompatible minimum and maximum heap sizes specified");
     }
-    _max_heap_size_cmdline = true;
   }
 
   // Check heap parameter properties
@@ -285,7 +283,7 @@
          "heap_alignment: " SIZE_FORMAT " not aligned by gen_alignment: " SIZE_FORMAT,
          _heap_alignment, _gen_alignment);
 
-  // All generational heaps have a youngest gen; handle those flags here
+  // All generational heaps have a young gen; handle those flags here
 
   // Make sure the heap is large enough for two generations
   size_t smallest_new_size = young_gen_size_lower_bound();
@@ -307,7 +305,7 @@
   // Make sure NewSize allows an old generation to fit even if set on the command line
   if (FLAG_IS_CMDLINE(NewSize) && NewSize >= _initial_heap_byte_size) {
     log_warning(gc, ergo)("NewSize was set larger than initial heap size, will use initial heap size.");
-    NewSize = bound_minus_alignment(NewSize, _initial_heap_byte_size);
+    FLAG_SET_ERGO(size_t, NewSize, bound_minus_alignment(NewSize, _initial_heap_byte_size));
   }
 
   // Now take the actual NewSize into account. We will silently increase NewSize
@@ -315,10 +313,7 @@
   size_t bounded_new_size = bound_minus_alignment(NewSize, MaxHeapSize);
   bounded_new_size = MAX2(smallest_new_size, (size_t)align_size_down(bounded_new_size, _gen_alignment));
   if (bounded_new_size != NewSize) {
-    // Do not use FLAG_SET_ERGO to update NewSize here, since this will override
-    // if NewSize was set on the command line or not. This information is needed
-    // later when setting the initial and minimum young generation size.
-    NewSize = bounded_new_size;
+    FLAG_SET_ERGO(size_t, NewSize, bounded_new_size);
   }
   _min_young_size = smallest_new_size;
   _initial_young_size = NewSize;
@@ -361,11 +356,11 @@
     vm_exit_during_initialization("Invalid young gen ratio specified");
   }
 
-  OldSize = MAX2(OldSize, old_gen_size_lower_bound());
+  if (OldSize < old_gen_size_lower_bound()) {
+    FLAG_SET_ERGO(size_t, OldSize, old_gen_size_lower_bound());
+  }
   if (!is_size_aligned(OldSize, _gen_alignment)) {
-    // Setting OldSize directly to preserve information about the possible
-    // setting of OldSize on the command line.
-    OldSize = align_size_down(OldSize, _gen_alignment);
+    FLAG_SET_ERGO(size_t, OldSize, align_size_down(OldSize, _gen_alignment));
   }
 
   if (FLAG_IS_CMDLINE(OldSize) && FLAG_IS_DEFAULT(MaxHeapSize)) {
@@ -384,7 +379,7 @@
 
   // Adjust NewSize and OldSize or MaxHeapSize to match each other
   if (NewSize + OldSize > MaxHeapSize) {
-    if (_max_heap_size_cmdline) {
+    if (FLAG_IS_CMDLINE(MaxHeapSize)) {
       // Somebody has set a maximum heap size with the intention that we should not
       // exceed it. Adjust New/OldSize as necessary.
       size_t calculated_size = NewSize + OldSize;
@@ -927,8 +922,23 @@
 
     save_flags();
 
+    // If NewSize has been ergonomically set, the collector policy
+    // should use it for min but calculate the initial young size
+    // using NewRatio.
+    flag_value = 20 * M;
+    set_basic_flag_values();
+    FLAG_SET_ERGO(size_t, NewSize, flag_value);
+    verify_young_min(flag_value);
+
+    set_basic_flag_values();
+    FLAG_SET_ERGO(size_t, NewSize, flag_value);
+    verify_scaled_young_initial(InitialHeapSize);
+
     // If NewSize is set on the command line, it should be used
     // for both min and initial young size if less than min heap.
+    // Note that once a flag has been set with FLAG_SET_CMDLINE it
+    // will be treated as it have been set on the command line for
+    // the rest of the VM lifetime. This is an irreversible change.
     flag_value = 20 * M;
     set_basic_flag_values();
     FLAG_SET_CMDLINE(size_t, NewSize, flag_value);
@@ -945,18 +955,6 @@
     FLAG_SET_CMDLINE(size_t, NewSize, flag_value);
     verify_young_initial(flag_value);
 
-    // If NewSize has been ergonomically set, the collector policy
-    // should use it for min but calculate the initial young size
-    // using NewRatio.
-    flag_value = 20 * M;
-    set_basic_flag_values();
-    FLAG_SET_ERGO(size_t, NewSize, flag_value);
-    verify_young_min(flag_value);
-
-    set_basic_flag_values();
-    FLAG_SET_ERGO(size_t, NewSize, flag_value);
-    verify_scaled_young_initial(InitialHeapSize);
-
     restore_flags();
   }
 
--- a/hotspot/src/share/vm/gc/shared/collectorPolicy.hpp	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectorPolicy.hpp	Thu Jul 21 19:50:41 2016 -0700
@@ -72,10 +72,6 @@
   size_t _space_alignment;
   size_t _heap_alignment;
 
-  // Needed to keep information if MaxHeapSize was set on the command line
-  // when the flag value is aligned etc by ergonomics.
-  bool _max_heap_size_cmdline;
-
   // The sizing of the heap is controlled by a sizing policy.
   AdaptiveSizePolicy* _size_policy;
 
--- a/hotspot/src/share/vm/opto/runtime.cpp	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/src/share/vm/opto/runtime.cpp	Thu Jul 21 19:50:41 2016 -0700
@@ -59,6 +59,7 @@
 #include "opto/mulnode.hpp"
 #include "opto/runtime.hpp"
 #include "opto/subnode.hpp"
+#include "prims/jvmtiThreadState.hpp"
 #include "runtime/atomic.inline.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/handles.inline.hpp"
@@ -1451,6 +1452,11 @@
   }
 #endif
 
+  JvmtiThreadState *state = thread->jvmti_thread_state();
+  if (state != NULL) {
+    state->set_exception_detected();
+  }
+
   thread->set_vm_result(exception);
   // Frame not compiled (handles deoptimization blob)
   return SharedRuntime::raw_exception_handler_for_return_address(thread, ret_pc);
--- a/hotspot/src/share/vm/runtime/globals.cpp	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/src/share/vm/runtime/globals.cpp	Thu Jul 21 19:50:41 2016 -0700
@@ -334,7 +334,8 @@
 
 void Flag::set_origin(Flags origin) {
   assert((origin & VALUE_ORIGIN_MASK) == origin, "sanity");
-  _flags = Flags((_flags & ~VALUE_ORIGIN_MASK) | origin);
+  Flags new_origin = Flags((origin == COMMAND_LINE) ? Flags(origin | ORIG_COMMAND_LINE) : origin);
+  _flags = Flags((_flags & ~VALUE_ORIGIN_MASK) | new_origin);
 }
 
 bool Flag::is_default() {
@@ -346,7 +347,11 @@
 }
 
 bool Flag::is_command_line() {
-  return (get_origin() == COMMAND_LINE);
+  return (_flags & ORIG_COMMAND_LINE) != 0;
+}
+
+void Flag::set_command_line() {
+  _flags = Flags(_flags | ORIG_COMMAND_LINE);
 }
 
 bool Flag::is_product() const {
@@ -464,25 +469,31 @@
   }
 
   if (!printRanges) {
-
-    st->print("%9s %-40s %c= ", _type, _name, (!is_default() ? ':' : ' '));
+    // The print below assumes that the flag name is 40 characters or less.
+    // This works for most flags, but there are exceptions. Our longest flag
+    // name right now is UseAdaptiveGenerationSizePolicyAtMajorCollection and
+    // its minor collection buddy. These are 48 characters. We use a buffer of
+    // 10 spaces below to adjust the space between the flag value and the
+    // column of flag type and origin that is printed in the end of the line.
+    char spaces[10 + 1] = "          ";
+    st->print("%9s %-40s = ", _type, _name);
 
     if (is_bool()) {
-      st->print("%-16s", get_bool() ? "true" : "false");
+      st->print("%-20s", get_bool() ? "true" : "false");
     } else if (is_int()) {
-      st->print("%-16d", get_int());
+      st->print("%-20d", get_int());
     } else if (is_uint()) {
-      st->print("%-16u", get_uint());
+      st->print("%-20u", get_uint());
     } else if (is_intx()) {
-      st->print(INTX_FORMAT_W(-16), get_intx());
+      st->print(INTX_FORMAT_W(-20), get_intx());
     } else if (is_uintx()) {
-      st->print(UINTX_FORMAT_W(-16), get_uintx());
+      st->print(UINTX_FORMAT_W(-20), get_uintx());
     } else if (is_uint64_t()) {
-      st->print(UINT64_FORMAT_W(-16), get_uint64_t());
+      st->print(UINT64_FORMAT_W(-20), get_uint64_t());
     } else if (is_size_t()) {
-      st->print(SIZE_FORMAT_W(-16), get_size_t());
+      st->print(SIZE_FORMAT_W(-20), get_size_t());
     } else if (is_double()) {
-      st->print("%-16f", get_double());
+      st->print("%-20f", get_double());
     } else if (is_ccstr()) {
       const char* cp = get_ccstr();
       if (cp != NULL) {
@@ -494,13 +505,14 @@
           cp = eol+1;
           st->print("%5s %-35s += ", "", _name);
         }
-        st->print("%-16s", cp);
+        st->print("%-20s", cp);
       }
-      else st->print("%-16s", "");
+      else st->print("%-20s", "");
     }
-
-    st->print("%-20s", " ");
-    print_kind(st);
+    assert(strlen(_name) < 50, "Flag name is longer than expected");
+    spaces[50 - MAX2((size_t)40, strlen(_name))] = '\0';
+    st->print("%s", spaces);
+    print_kind_and_origin(st);
 
 #ifndef PRODUCT
     if (withComments) {
@@ -533,8 +545,8 @@
     }
     CommandLineFlagRangeList::print(st, _name, func);
 
-    st->print(" %-20s", " ");
-    print_kind(st);
+    st->print(" %-16s", " ");
+    print_kind_and_origin(st);
 
 #ifndef PRODUCT
     if (withComments) {
@@ -546,7 +558,7 @@
   }
 }
 
-void Flag::print_kind(outputStream* st) {
+void Flag::print_kind_and_origin(outputStream* st) {
   struct Data {
     int flag;
     const char* name;
@@ -572,23 +584,58 @@
   };
 
   if ((_flags & KIND_MASK) != 0) {
-    st->print("{");
     bool is_first = true;
+    const size_t buffer_size = 64;
+    size_t buffer_used = 0;
+    char kind[buffer_size];
 
+    jio_snprintf(kind, buffer_size, "{");
+    buffer_used++;
     for (int i = 0; data[i].flag != -1; i++) {
       Data d = data[i];
       if ((_flags & d.flag) != 0) {
         if (is_first) {
           is_first = false;
         } else {
-          st->print(" ");
+          assert(buffer_used + 1 < buffer_size, "Too small buffer");
+          jio_snprintf(kind + buffer_used, buffer_size - buffer_used, " ");
+          buffer_used++;
         }
-        st->print("%s", d.name);
+        size_t length = strlen(d.name);
+        assert(buffer_used + length < buffer_size, "Too small buffer");
+        jio_snprintf(kind + buffer_used, buffer_size - buffer_used, "%s", d.name);
+        buffer_used += length;
       }
     }
+    assert(buffer_used + 2 <= buffer_size, "Too small buffer");
+    jio_snprintf(kind + buffer_used, buffer_size - buffer_used, "}");
+    st->print("%20s", kind);
+  }
 
-    st->print("}");
+  int origin = _flags & VALUE_ORIGIN_MASK;
+  st->print(" {");
+  switch(origin) {
+    case DEFAULT:
+      st->print("default"); break;
+    case COMMAND_LINE:
+      st->print("command line"); break;
+    case ENVIRON_VAR:
+      st->print("environment"); break;
+    case CONFIG_FILE:
+      st->print("config file"); break;
+    case MANAGEMENT:
+      st->print("management"); break;
+    case ERGONOMIC:
+      if (_flags & ORIG_COMMAND_LINE) {
+        st->print("command line, ");
+      }
+      st->print("ergonomic"); break;
+    case ATTACH_ON_DEMAND:
+      st->print("attach"); break;
+    case INTERNAL:
+      st->print("internal"); break;
   }
+  st->print("}");
 }
 
 void Flag::print_as_flag(outputStream* st) {
@@ -918,6 +965,12 @@
   return true;
 }
 
+void CommandLineFlagsEx::setOnCmdLine(CommandLineFlagWithType flag) {
+  Flag* faddr = address_of_flag(flag);
+  assert(faddr != NULL, "Unknown flag");
+  faddr->set_command_line();
+}
+
 template<class E, class T>
 static void trace_flag_changed(const char* name, const T old_value, const T new_value, const Flag::Flags origin) {
   E e;
--- a/hotspot/src/share/vm/runtime/globals.hpp	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Jul 21 19:50:41 2016 -0700
@@ -229,7 +229,7 @@
 
 struct Flag {
   enum Flags {
-    // value origin
+    // latest value origin
     DEFAULT          = 0,
     COMMAND_LINE     = 1,
     ENVIRON_VAR      = 2,
@@ -260,7 +260,10 @@
     KIND_COMMERCIAL         = 1 << 17,
     KIND_JVMCI              = 1 << 18,
 
-    KIND_MASK = ~VALUE_ORIGIN_MASK
+    // set this bit if the flag was set on the command line
+    ORIG_COMMAND_LINE       = 1 << 19,
+
+    KIND_MASK = ~(VALUE_ORIGIN_MASK | ORIG_COMMAND_LINE)
   };
 
   enum Error {
@@ -272,7 +275,7 @@
     MISSING_VALUE,
     // error parsing the textual form of the value
     WRONG_FORMAT,
-    // flag is not writeable
+    // flag is not writable
     NON_WRITABLE,
     // flag value is outside of its bounds
     OUT_OF_BOUNDS,
@@ -367,6 +370,7 @@
   bool is_default();
   bool is_ergonomic();
   bool is_command_line();
+  void set_command_line();
 
   bool is_product() const;
   bool is_manageable() const;
@@ -396,7 +400,7 @@
 
   // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
   void print_on(outputStream* st, bool withComments = false, bool printRanges = false);
-  void print_kind(outputStream* st);
+  void print_kind_and_origin(outputStream* st);
   void print_as_flag(outputStream* st);
 
   static const char* flag_error_str(Flag::Error error);
--- a/hotspot/src/share/vm/runtime/globals_extension.hpp	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/src/share/vm/runtime/globals_extension.hpp	Thu Jul 21 19:50:41 2016 -0700
@@ -334,8 +334,9 @@
 
 #define FLAG_SET_DEFAULT(name, value) ((name) = (value))
 
-#define FLAG_SET_CMDLINE(type, name, value) (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value), Flag::COMMAND_LINE))
-#define FLAG_SET_ERGO(type, name, value)    (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value), Flag::ERGONOMIC))
+#define FLAG_SET_CMDLINE(type, name, value) (CommandLineFlagsEx::setOnCmdLine(FLAG_MEMBER_WITH_TYPE(name, type)), \
+                                             CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name, type), (type)(value), Flag::COMMAND_LINE))
+#define FLAG_SET_ERGO(type, name, value)    (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name, type), (type)(value), Flag::ERGONOMIC))
 #define FLAG_SET_ERGO_IF_DEFAULT(type, name, value) \
   do {                                              \
     if (FLAG_IS_DEFAULT(name)) {                    \
@@ -361,6 +362,8 @@
   static bool is_default(CommandLineFlag flag);
   static bool is_ergo(CommandLineFlag flag);
   static bool is_cmdline(CommandLineFlag flag);
+
+  static void setOnCmdLine(CommandLineFlagWithType flag);
 };
 
 #endif // SHARE_VM_RUNTIME_GLOBALS_EXTENSION_HPP
--- a/hotspot/test/compiler/arguments/CheckCICompilerCount.java	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/test/compiler/arguments/CheckCICompilerCount.java	Thu Jul 21 19:50:41 2016 -0700
@@ -72,14 +72,14 @@
             "Improperly specified VM option 'CICompilerCount=0'"
         },
         {
-            "intx CICompilerCount                          := 1                                   {product}"
+            "intx CICompilerCount                          = 1                                        {product} {command line}"
         },
         {
             "CICompilerCount (0) must be at least 1",
             "Improperly specified VM option 'CICompilerCount=0'"
         },
         {
-            "intx CICompilerCount                          := 1                                   {product}"
+            "intx CICompilerCount                          = 1                                        {product} {command line}"
         }
     };
 
@@ -127,14 +127,14 @@
             "Improperly specified VM option 'CICompilerCount=1'"
         },
         {
-            "intx CICompilerCount                          := 2                                   {product}"
+            "intx CICompilerCount                          = 2                                        {product} {command line, ergonomic}"
         },
         {
             "CICompilerCount (1) must be at least 2",
             "Improperly specified VM option 'CICompilerCount=1'"
         },
         {
-            "intx CICompilerCount                          := 2                                   {product}"
+            "intx CICompilerCount                          = 2                                        {product} {command line, ergonomic}"
         }
     };
 
--- a/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java	Thu Jul 21 19:50:41 2016 -0700
@@ -105,25 +105,25 @@
 
     private static final String[][] NON_TIERED_EXPECTED_OUTPUTS = {
         {
-            "intx CompileThreshold                         := 1000                                {pd product}",
-            "double CompileThresholdScaling                   = 1.000000                            {product}"
+            "intx CompileThreshold                         = 1000                                  {pd product} {command line}",
+            "double CompileThresholdScaling                  = 1.000000                                 {product} {default}"
         },
         {
-            "intx CompileThreshold                         := 1250                                {pd product}",
-            "double CompileThresholdScaling                  := 1.250000                            {product}"
+            "intx CompileThreshold                         = 1250                                  {pd product} {command line, ergonomic}",
+            "double CompileThresholdScaling                  = 1.250000                                 {product} {command line}"
         },
         {
-            "intx CompileThreshold                         := 750                                 {pd product}",
-            "double CompileThresholdScaling                  := 0.750000                            {product}"
+            "intx CompileThreshold                         = 750                                   {pd product} {command line, ergonomic}",
+            "double CompileThresholdScaling                  = 0.750000                                 {product} {command line}"
         },
         {
-            "intx CompileThreshold                         := 1000                                {pd product}",
-            "double CompileThresholdScaling                  := 0.000000                            {product}",
+            "intx CompileThreshold                         = 1000                                  {pd product} {command line}",
+            "double CompileThresholdScaling                  = 0.000000                                 {product} {command line}",
             "interpreted mode"
         },
         {
-            "intx CompileThreshold                         := 0                                   {pd product}",
-            "double CompileThresholdScaling                  := 0.750000                            {product}",
+            "intx CompileThreshold                         = 0                                     {pd product} {command line, ergonomic}",
+            "double CompileThresholdScaling                  = 0.750000                                 {product} {command line}",
             "interpreted mode"
         }
     };
@@ -237,94 +237,94 @@
 
     private static final String[][] TIERED_EXPECTED_OUTPUTS = {
         {
-            "intx Tier0BackedgeNotifyFreqLog               := 10                                  {product}",
-            "intx Tier0InvokeNotifyFreqLog                 := 7                                   {product}",
-            "intx Tier23InlineeNotifyFreqLog               := 20                                  {product}",
-            "intx Tier2BackedgeNotifyFreqLog               := 14                                  {product}",
-            "intx Tier2InvokeNotifyFreqLog                 := 11                                  {product}",
-            "intx Tier3BackEdgeThreshold                   := 60000                               {product}",
-            "intx Tier3BackedgeNotifyFreqLog               := 13                                  {product}",
-            "intx Tier3CompileThreshold                    := 2000                                {product}",
-            "intx Tier3InvocationThreshold                 := 200                                 {product}",
-            "intx Tier3InvokeNotifyFreqLog                 := 10                                  {product}",
-            "intx Tier3MinInvocationThreshold              := 100                                 {product}",
-            "intx Tier4BackEdgeThreshold                   := 40000                               {product}",
-            "intx Tier4CompileThreshold                    := 15000                               {product}",
-            "intx Tier4InvocationThreshold                 := 5000                                {product}",
-            "intx Tier4MinInvocationThreshold              := 600                                 {product}",
-            "double CompileThresholdScaling                   = 1.000000                            {product}"
+            "intx Tier0BackedgeNotifyFreqLog               = 10                                       {product} {command line}",
+            "intx Tier0InvokeNotifyFreqLog                 = 7                                        {product} {command line}",
+            "intx Tier23InlineeNotifyFreqLog               = 20                                       {product} {command line}",
+            "intx Tier2BackedgeNotifyFreqLog               = 14                                       {product} {command line}",
+            "intx Tier2InvokeNotifyFreqLog                 = 11                                       {product} {command line}",
+            "intx Tier3BackEdgeThreshold                   = 60000                                    {product} {command line}",
+            "intx Tier3BackedgeNotifyFreqLog               = 13                                       {product} {command line}",
+            "intx Tier3CompileThreshold                    = 2000                                     {product} {command line}",
+            "intx Tier3InvocationThreshold                 = 200                                      {product} {command line}",
+            "intx Tier3InvokeNotifyFreqLog                 = 10                                       {product} {command line}",
+            "intx Tier3MinInvocationThreshold              = 100                                      {product} {command line}",
+            "intx Tier4BackEdgeThreshold                   = 40000                                    {product} {command line}",
+            "intx Tier4CompileThreshold                    = 15000                                    {product} {command line}",
+            "intx Tier4InvocationThreshold                 = 5000                                     {product} {command line}",
+            "intx Tier4MinInvocationThreshold              = 600                                      {product} {command line}",
+            "double CompileThresholdScaling                  = 1.000000                                 {product} {default}"
         },
         {
-            "intx Tier0BackedgeNotifyFreqLog               := 9                                   {product}",
-            "intx Tier0InvokeNotifyFreqLog                 := 6                                   {product}",
-            "intx Tier23InlineeNotifyFreqLog               := 19                                  {product}",
-            "intx Tier2BackedgeNotifyFreqLog               := 13                                  {product}",
-            "intx Tier2InvokeNotifyFreqLog                 := 10                                  {product}",
-            "intx Tier3BackEdgeThreshold                   := 45000                               {product}",
-            "intx Tier3BackedgeNotifyFreqLog               := 12                                  {product}",
-            "intx Tier3CompileThreshold                    := 1500                                {product}",
-            "intx Tier3InvocationThreshold                 := 150                                 {product}",
-            "intx Tier3InvokeNotifyFreqLog                 := 9                                   {product}",
-            "intx Tier3MinInvocationThreshold              := 75                                  {product}",
-            "intx Tier4BackEdgeThreshold                   := 30000                               {product}",
-            "intx Tier4CompileThreshold                    := 11250                               {product}",
-            "intx Tier4InvocationThreshold                 := 3750                                {product}",
-            "intx Tier4MinInvocationThreshold              := 450                                 {product}",
-            "double CompileThresholdScaling                  := 0.750000                            {product}"
+            "intx Tier0BackedgeNotifyFreqLog               = 9                                        {product} {command line, ergonomic}",
+            "intx Tier0InvokeNotifyFreqLog                 = 6                                        {product} {command line, ergonomic}",
+            "intx Tier23InlineeNotifyFreqLog               = 19                                       {product} {command line, ergonomic}",
+            "intx Tier2BackedgeNotifyFreqLog               = 13                                       {product} {command line, ergonomic}",
+            "intx Tier2InvokeNotifyFreqLog                 = 10                                       {product} {command line, ergonomic}",
+            "intx Tier3BackEdgeThreshold                   = 45000                                    {product} {command line, ergonomic}",
+            "intx Tier3BackedgeNotifyFreqLog               = 12                                       {product} {command line, ergonomic}",
+            "intx Tier3CompileThreshold                    = 1500                                     {product} {command line, ergonomic}",
+            "intx Tier3InvocationThreshold                 = 150                                      {product} {command line, ergonomic}",
+            "intx Tier3InvokeNotifyFreqLog                 = 9                                        {product} {command line, ergonomic}",
+            "intx Tier3MinInvocationThreshold              = 75                                       {product} {command line, ergonomic}",
+            "intx Tier4BackEdgeThreshold                   = 30000                                    {product} {command line, ergonomic}",
+            "intx Tier4CompileThreshold                    = 11250                                    {product} {command line, ergonomic}",
+            "intx Tier4InvocationThreshold                 = 3750                                     {product} {command line, ergonomic}",
+            "intx Tier4MinInvocationThreshold              = 450                                      {product} {command line, ergonomic}",
+            "double CompileThresholdScaling                  = 0.750000                                 {product} {command line}"
         },
         {
-            "intx Tier0BackedgeNotifyFreqLog               := 10                                  {product}",
-            "intx Tier0InvokeNotifyFreqLog                 := 7                                   {product}",
-            "intx Tier23InlineeNotifyFreqLog               := 20                                  {product}",
-            "intx Tier2BackedgeNotifyFreqLog               := 14                                  {product}",
-            "intx Tier2InvokeNotifyFreqLog                 := 11                                  {product}",
-            "intx Tier3BackEdgeThreshold                   := 75000                               {product}",
-            "intx Tier3BackedgeNotifyFreqLog               := 13                                  {product}",
-            "intx Tier3CompileThreshold                    := 2500                                {product}",
-            "intx Tier3InvocationThreshold                 := 250                                 {product}",
-            "intx Tier3InvokeNotifyFreqLog                 := 10                                  {product}",
-            "intx Tier3MinInvocationThreshold              := 125                                 {product}",
-            "intx Tier4BackEdgeThreshold                   := 50000                               {product}",
-            "intx Tier4CompileThreshold                    := 18750                               {product}",
-            "intx Tier4InvocationThreshold                 := 6250                                {product}",
-            "intx Tier4MinInvocationThreshold              := 750                                 {product}",
-            "double CompileThresholdScaling                  := 1.250000                            {product}"
+            "intx Tier0BackedgeNotifyFreqLog               = 10                                       {product} {command line, ergonomic}",
+            "intx Tier0InvokeNotifyFreqLog                 = 7                                        {product} {command line, ergonomic}",
+            "intx Tier23InlineeNotifyFreqLog               = 20                                       {product} {command line, ergonomic}",
+            "intx Tier2BackedgeNotifyFreqLog               = 14                                       {product} {command line, ergonomic}",
+            "intx Tier2InvokeNotifyFreqLog                 = 11                                       {product} {command line, ergonomic}",
+            "intx Tier3BackEdgeThreshold                   = 75000                                    {product} {command line, ergonomic}",
+            "intx Tier3BackedgeNotifyFreqLog               = 13                                       {product} {command line, ergonomic}",
+            "intx Tier3CompileThreshold                    = 2500                                     {product} {command line, ergonomic}",
+            "intx Tier3InvocationThreshold                 = 250                                      {product} {command line, ergonomic}",
+            "intx Tier3InvokeNotifyFreqLog                 = 10                                       {product} {command line, ergonomic}",
+            "intx Tier3MinInvocationThreshold              = 125                                      {product} {command line, ergonomic}",
+            "intx Tier4BackEdgeThreshold                   = 50000                                    {product} {command line, ergonomic}",
+            "intx Tier4CompileThreshold                    = 18750                                    {product} {command line, ergonomic}",
+            "intx Tier4InvocationThreshold                 = 6250                                     {product} {command line, ergonomic}",
+            "intx Tier4MinInvocationThreshold              = 750                                      {product} {command line, ergonomic}",
+            "double CompileThresholdScaling                  = 1.250000                                 {product} {command line}"
         },
         {
-            "intx Tier0BackedgeNotifyFreqLog               := 11                                  {product}",
-            "intx Tier0InvokeNotifyFreqLog                 := 8                                   {product}",
-            "intx Tier23InlineeNotifyFreqLog               := 21                                  {product}",
-            "intx Tier2BackedgeNotifyFreqLog               := 15                                  {product}",
-            "intx Tier2InvokeNotifyFreqLog                 := 12                                  {product}",
-            "intx Tier3BackEdgeThreshold                   := 120000                              {product}",
-            "intx Tier3BackedgeNotifyFreqLog               := 14                                  {product}",
-            "intx Tier3CompileThreshold                    := 4000                                {product}",
-            "intx Tier3InvocationThreshold                 := 400                                 {product}",
-            "intx Tier3InvokeNotifyFreqLog                 := 11                                  {product}",
-            "intx Tier3MinInvocationThreshold              := 200                                 {product}",
-            "intx Tier4BackEdgeThreshold                   := 80000                               {product}",
-            "intx Tier4CompileThreshold                    := 30000                               {product}",
-            "intx Tier4InvocationThreshold                 := 10000                               {product}",
-            "intx Tier4MinInvocationThreshold              := 1200                                {product}",
-            "double CompileThresholdScaling                  := 2.000000                            {product}"
+            "intx Tier0BackedgeNotifyFreqLog               = 11                                       {product} {command line, ergonomic}",
+            "intx Tier0InvokeNotifyFreqLog                 = 8                                        {product} {command line, ergonomic}",
+            "intx Tier23InlineeNotifyFreqLog               = 21                                       {product} {command line, ergonomic}",
+            "intx Tier2BackedgeNotifyFreqLog               = 15                                       {product} {command line, ergonomic}",
+            "intx Tier2InvokeNotifyFreqLog                 = 12                                       {product} {command line, ergonomic}",
+            "intx Tier3BackEdgeThreshold                   = 120000                                   {product} {command line, ergonomic}",
+            "intx Tier3BackedgeNotifyFreqLog               = 14                                       {product} {command line, ergonomic}",
+            "intx Tier3CompileThreshold                    = 4000                                     {product} {command line, ergonomic}",
+            "intx Tier3InvocationThreshold                 = 400                                      {product} {command line, ergonomic}",
+            "intx Tier3InvokeNotifyFreqLog                 = 11                                       {product} {command line, ergonomic}",
+            "intx Tier3MinInvocationThreshold              = 200                                      {product} {command line, ergonomic}",
+            "intx Tier4BackEdgeThreshold                   = 80000                                    {product} {command line, ergonomic}",
+            "intx Tier4CompileThreshold                    = 30000                                    {product} {command line, ergonomic}",
+            "intx Tier4InvocationThreshold                 = 10000                                    {product} {command line, ergonomic}",
+            "intx Tier4MinInvocationThreshold              = 1200                                     {product} {command line, ergonomic}",
+            "double CompileThresholdScaling                  = 2.000000                                 {product} {command line}"
         },
         {
-            "intx Tier0BackedgeNotifyFreqLog               := 10                                  {product}",
-            "intx Tier0InvokeNotifyFreqLog                 := 7                                   {product}",
-            "intx Tier23InlineeNotifyFreqLog               := 20                                  {product}",
-            "intx Tier2BackedgeNotifyFreqLog               := 14                                  {product}",
-            "intx Tier2InvokeNotifyFreqLog                 := 11                                  {product}",
-            "intx Tier3BackEdgeThreshold                   := 60000                               {product}",
-            "intx Tier3BackedgeNotifyFreqLog               := 13                                  {product}",
-            "intx Tier3CompileThreshold                    := 2000                                {product}",
-            "intx Tier3InvocationThreshold                 := 200                                 {product}",
-            "intx Tier3InvokeNotifyFreqLog                 := 10                                  {product}",
-            "intx Tier3MinInvocationThreshold              := 100                                 {product}",
-            "intx Tier4BackEdgeThreshold                   := 40000                               {product}",
-            "intx Tier4CompileThreshold                    := 15000                               {product}",
-            "intx Tier4InvocationThreshold                 := 5000                                {product}",
-            "intx Tier4MinInvocationThreshold              := 600                                 {product}",
-            "double CompileThresholdScaling                  := 0.000000                            {product}",
+            "intx Tier0BackedgeNotifyFreqLog               = 10                                       {product} {command line}",
+            "intx Tier0InvokeNotifyFreqLog                 = 7                                        {product} {command line}",
+            "intx Tier23InlineeNotifyFreqLog               = 20                                       {product} {command line}",
+            "intx Tier2BackedgeNotifyFreqLog               = 14                                       {product} {command line}",
+            "intx Tier2InvokeNotifyFreqLog                 = 11                                       {product} {command line}",
+            "intx Tier3BackEdgeThreshold                   = 60000                                    {product} {command line}",
+            "intx Tier3BackedgeNotifyFreqLog               = 13                                       {product} {command line}",
+            "intx Tier3CompileThreshold                    = 2000                                     {product} {command line}",
+            "intx Tier3InvocationThreshold                 = 200                                      {product} {command line}",
+            "intx Tier3InvokeNotifyFreqLog                 = 10                                       {product} {command line}",
+            "intx Tier3MinInvocationThreshold              = 100                                      {product} {command line}",
+            "intx Tier4BackEdgeThreshold                   = 40000                                    {product} {command line}",
+            "intx Tier4CompileThreshold                    = 15000                                    {product} {command line}",
+            "intx Tier4InvocationThreshold                 = 5000                                     {product} {command line}",
+            "intx Tier4MinInvocationThreshold              = 600                                      {product} {command line}",
+            "double CompileThresholdScaling                  = 0.000000                                 {product} {command line}",
             "interpreted mode"
         }
     };
--- a/hotspot/test/gc/metaspace/TestMetaspaceSizeFlags.java	Wed Jul 05 22:00:06 2017 +0200
+++ b/hotspot/test/gc/metaspace/TestMetaspaceSizeFlags.java	Thu Jul 21 19:50:41 2016 -0700
@@ -74,8 +74,8 @@
     OutputAnalyzer output = run(maxMetaspaceSize, metaspaceSize);
     output.shouldNotMatch("Error occurred during initialization of VM\n.*");
 
-    String stringMaxMetaspaceSize = output.firstMatch(".* MaxMetaspaceSize .* := (\\d+).*", 1);
-    String stringMetaspaceSize = output.firstMatch(".* MetaspaceSize .* := (\\d+).*", 1);
+    String stringMaxMetaspaceSize = output.firstMatch(".* MaxMetaspaceSize .* = (\\d+).*", 1);
+    String stringMetaspaceSize = output.firstMatch(".* MetaspaceSize .* = (\\d+).*", 1);
 
     return new MetaspaceFlags(Long.parseLong(stringMaxMetaspaceSize),
                               Long.parseLong(stringMetaspaceSize));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/jvmti/ExceptionCaughtOutOfPhase/ExceptionCaughtOutOfPhaseTest.java	Thu Jul 21 19:50:41 2016 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/*
+ * @test
+ * @bug 8134434
+ * @summary JVM_DoPrivileged() fires assert(_exception_caught == false) failed: _exception_caught is out of phase
+ * @run main/othervm -agentlib:jdwp=transport=dt_socket,address=9000,server=y,suspend=n -Xbatch ExceptionCaughtOutOfPhaseTest
+ */
+
+public class ExceptionCaughtOutOfPhaseTest {
+    public static void main(String[] args) {
+        PrivilegedAction action = new HotThrowingAction();
+        System.out.println("### Warm-up");
+        for(int i=0; i<11000; i++) {
+            try {
+                action.run(); // call run() to get it compiled
+            } catch(Throwable t) {
+                // ignored
+            }
+        }
+
+        System.out.println("### Warm-up done");
+        System.out.println("### Executing privileged action");
+
+        try {
+            AccessController.doPrivileged(action);
+        } catch (Error e) {
+            // ignored
+        }
+    }
+
+    public static class HotThrowingAction implements PrivilegedAction {
+        public Object run() {
+            throw new Error();
+        }
+    }
+}