changeset 10727:500776d80c5b

Merge
author gziemski
date Thu, 31 Mar 2016 14:18:25 +0000
parents 55867c470001 2d5956d1a9f3
children 12fa649d73af 252b571bbb86 03c5c21d3620
files src/share/vm/runtime/globals.hpp
diffstat 11 files changed, 124 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java	Thu Mar 31 14:18:25 2016 +0000
@@ -549,11 +549,9 @@
         },
         new Command("buildreplayjars", "buildreplayjars [ all | app | boot ]  | [ prefix ]", false) {
             // This is used to dump jar files of all the classes
-            // loaded in the core.  Everything on the bootclasspath
+            // loaded in the core.  Everything with null classloader
             // will go in boot.jar and everything else will go in
-            // app.jar.  Then the classes can be loaded by the replay
-            // jvm using -Xbootclasspath/p:boot.jar -cp app.jar. boot.jar usually
-            // not needed, unless changed by jvmti.
+            // app.jar. boot.jar usually not needed, unless changed by jvmti.
             public void doit(Tokens t) {
                 int tcount = t.countTokens();
                 if (tcount > 2) {
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java	Thu Mar 31 14:18:25 2016 +0000
@@ -780,8 +780,8 @@
         return getPath("java.class.path");
     }
 
-    public List bootClassPath() {
-        return getPath("sun.boot.class.path");
+    public List<String> bootClassPath() {
+        return Collections.emptyList();
     }
 
     public String baseDirectory() {
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaVM.java	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaVM.java	Thu Mar 31 14:18:25 2016 +0000
@@ -75,8 +75,6 @@
             return vm.getVMRelease();
         case FIELD_CLASS_PATH:
             return getClassPath();
-        case FIELD_BOOT_CLASS_PATH:
-            return getBootClassPath();
         case FIELD_USER_DIR:
             return getUserDir();
         case FIELD_UNDEFINED:
@@ -143,7 +141,6 @@
         addField("type", FIELD_TYPE);
         addField("version", FIELD_VERSION);
         addField("classPath", FIELD_CLASS_PATH);
-        addField("bootClassPath", FIELD_BOOT_CLASS_PATH);
         addField("userDir", FIELD_USER_DIR);
     }
 
@@ -217,10 +214,6 @@
         return vm.getSystemProperty("java.class.path");
     }
 
-    private String getBootClassPath() {
-        return vm.getSystemProperty("sun.boot.class.path");
-    }
-
     private String getUserDir() {
         return vm.getSystemProperty("user.dir");
     }
--- a/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/share/vm/gc/g1/g1GCPhaseTimes.cpp	Thu Mar 31 14:18:25 2016 +0000
@@ -277,11 +277,11 @@
   }
   debug_line("Choose CSet", (_recorded_young_cset_choice_time_ms + _recorded_non_young_cset_choice_time_ms));
   debug_line("Preserve CM Refs", _recorded_preserve_cm_referents_time_ms);
+  trace_phase(_gc_par_phases[PreserveCMReferents]);
   debug_line("Reference Processing", _cur_ref_proc_time_ms);
   debug_line("Reference Enqueuing", _cur_ref_enq_time_ms);
   debug_line("Redirty Cards", _recorded_redirty_logged_cards_time_ms);
   trace_phase(_gc_par_phases[RedirtyCards]);
-  trace_phase(_gc_par_phases[PreserveCMReferents]);
   if (G1EagerReclaimHumongousObjects) {
     debug_line("Humongous Register", _cur_fast_reclaim_humongous_register_time_ms);
     trace_line_sz("Humongous Total", _cur_fast_reclaim_humongous_total);
--- a/src/share/vm/runtime/commandLineFlagConstraintList.cpp	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/share/vm/runtime/commandLineFlagConstraintList.cpp	Thu Mar 31 14:18:25 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -290,16 +290,24 @@
 #endif // INCLUDE_ALL_GCS
 }
 
+CommandLineFlagConstraint* CommandLineFlagConstraintList::find(const char* name) {
+  CommandLineFlagConstraint* found = NULL;
+  for (int i=0; i<length(); i++) {
+    CommandLineFlagConstraint* constraint = at(i);
+    if (strcmp(constraint->name(), name) == 0) {
+      found = constraint;
+      break;
+    }
+  }
+  return found;
+}
+
 // Find constraints by name and return only if found constraint's type is equal or lower than current validating type.
 CommandLineFlagConstraint* CommandLineFlagConstraintList::find_if_needs_check(const char* name) {
   CommandLineFlagConstraint* found = NULL;
-  for (int i=0; i<length(); i++) {
-    CommandLineFlagConstraint* constraint = at(i);
-    if ((strcmp(constraint->name(), name) == 0) &&
-        (constraint->type() <= _validating_type)) {
-      found = constraint;
-      break;
-    }
+  CommandLineFlagConstraint* constraint = find(name);
+  if (constraint && (constraint->type() <= _validating_type)) {
+    found = constraint;
   }
   return found;
 }
--- a/src/share/vm/runtime/commandLineFlagConstraintList.hpp	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/share/vm/runtime/commandLineFlagConstraintList.hpp	Thu Mar 31 14:18:25 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -89,6 +89,7 @@
   static void init();
   static int length() { return (_constraints != NULL) ? _constraints->length() : 0; }
   static CommandLineFlagConstraint* at(int i) { return (_constraints != NULL) ? _constraints->at(i) : NULL; }
+  static CommandLineFlagConstraint* find(const char* name);
   static CommandLineFlagConstraint* find_if_needs_check(const char* name);
   static void add(CommandLineFlagConstraint* constraint) { _constraints->append(constraint); }
   // True if 'AfterErgo' or later constraint functions are validated.
--- a/src/share/vm/runtime/commandLineFlagRangeList.cpp	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/share/vm/runtime/commandLineFlagRangeList.cpp	Thu Mar 31 14:18:25 2016 +0000
@@ -27,6 +27,7 @@
 #include "classfile/symbolTable.hpp"
 #include "gc/shared/referenceProcessor.hpp"
 #include "runtime/arguments.hpp"
+#include "runtime/commandLineFlagConstraintList.hpp"
 #include "runtime/commandLineFlagRangeList.hpp"
 #include "runtime/os.hpp"
 #include "runtime/task.hpp"
@@ -378,12 +379,18 @@
   return found;
 }
 
-void CommandLineFlagRangeList::print(const char* name, outputStream* st, bool unspecified) {
+void CommandLineFlagRangeList::print(outputStream* st, const char* name, RangeStrFunc default_range_str_func) {
   CommandLineFlagRange* range = CommandLineFlagRangeList::find(name);
   if (range != NULL) {
     range->print(st);
-  } else if (unspecified == true) {
-    st->print("[                           ...                           ]");
+  } else {
+    CommandLineFlagConstraint* constraint = CommandLineFlagConstraintList::find(name);
+    if (constraint != NULL) {
+      assert(default_range_str_func!=NULL, "default_range_str_func must be provided");
+      st->print("%s", default_range_str_func());
+    } else {
+      st->print("[                           ...                           ]");
+    }
   }
 }
 
--- a/src/share/vm/runtime/commandLineFlagRangeList.hpp	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/share/vm/runtime/commandLineFlagRangeList.hpp	Thu Mar 31 14:18:25 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -71,7 +71,7 @@
   static CommandLineFlagRange* at(int i) { return (_ranges != NULL) ? _ranges->at(i) : NULL; }
   static CommandLineFlagRange* find(const char* name);
   static void add(CommandLineFlagRange* range) { _ranges->append(range); }
-  static void print(const char* name, outputStream* st, bool unspecified = false);
+  static void print(outputStream* st, const char* name, RangeStrFunc default_range_str_func);
   // Check the final values of all flags for ranges.
   static bool check_ranges();
 };
--- a/src/share/vm/runtime/globals.cpp	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/share/vm/runtime/globals.cpp	Thu Mar 31 14:18:25 2016 +0000
@@ -84,6 +84,56 @@
 
 MATERIALIZE_FLAGS_EXT
 
+#define DEFAULT_RANGE_STR_CHUNK_SIZE 64
+static char* create_range_str(const char *fmt, ...) {
+  static size_t string_length = DEFAULT_RANGE_STR_CHUNK_SIZE;
+  static char* range_string = NEW_C_HEAP_ARRAY(char, string_length, mtLogging);
+
+  int size_needed = 0;
+  do {
+    va_list args;
+    va_start(args, fmt);
+    size_needed = jio_vsnprintf(range_string, string_length, fmt, args);
+    va_end(args);
+
+    if (size_needed < 0) {
+      string_length += DEFAULT_RANGE_STR_CHUNK_SIZE;
+      range_string = REALLOC_C_HEAP_ARRAY(char, range_string, string_length, mtLogging);
+      guarantee(range_string != NULL, "create_range_str string should not be NULL");
+    }
+  } while (size_needed < 0);
+
+  return range_string;
+}
+
+const char* Flag::get_int_default_range_str() {
+  return create_range_str("[ " INT32_FORMAT_W(-25) " ... " INT32_FORMAT_W(25) " ]", INT_MIN, INT_MAX);
+}
+
+const char* Flag::get_uint_default_range_str() {
+  return create_range_str("[ " UINT32_FORMAT_W(-25) " ... " UINT32_FORMAT_W(25) " ]", 0, UINT_MAX);
+}
+
+const char* Flag::get_intx_default_range_str() {
+  return create_range_str("[ " INTX_FORMAT_W(-25) " ... " INTX_FORMAT_W(25) " ]", min_intx, max_intx);
+}
+
+const char* Flag::get_uintx_default_range_str() {
+  return create_range_str("[ " UINTX_FORMAT_W(-25) " ... " UINTX_FORMAT_W(25) " ]", 0, max_uintx);
+}
+
+const char* Flag::get_uint64_t_default_range_str() {
+  return create_range_str("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", 0, uint64_t(max_juint));
+}
+
+const char* Flag::get_size_t_default_range_str() {
+  return create_range_str("[ " SIZE_FORMAT_W(-25) " ... " SIZE_FORMAT_W(25) " ]", 0, SIZE_MAX);
+}
+
+const char* Flag::get_double_default_range_str() {
+  return create_range_str("[ %-25.3f ... %25.3f ]", DBL_MIN, DBL_MAX);
+}
+
 static bool is_product_build() {
 #ifdef PRODUCT
   return true;
@@ -405,7 +455,25 @@
   } else if (!is_bool() && !is_ccstr()) {
     st->print("%9s %-50s ", _type, _name);
 
-    CommandLineFlagRangeList::print(_name, st, true);
+    RangeStrFunc func = NULL;
+    if (is_int()) {
+      func = Flag::get_int_default_range_str;
+    } else if (is_uint()) {
+      func = Flag::get_uint_default_range_str;
+    } else if (is_intx()) {
+      func = Flag::get_intx_default_range_str;
+    } else if (is_uintx()) {
+      func = Flag::get_uintx_default_range_str;
+    } else if (is_uint64_t()) {
+      func = Flag::get_uint64_t_default_range_str;
+    } else if (is_size_t()) {
+      func = Flag::get_size_t_default_range_str;
+    } else if (is_double()) {
+      func = Flag::get_double_default_range_str;
+    } else {
+      ShouldNotReachHere();
+    }
+    CommandLineFlagRangeList::print(st, _name, func);
 
     st->print(" %-20s", " ");
     print_kind(st);
--- a/src/share/vm/runtime/globals.hpp	Wed Mar 30 11:28:51 2016 -0500
+++ b/src/share/vm/runtime/globals.hpp	Thu Mar 31 14:18:25 2016 +0000
@@ -224,6 +224,9 @@
 typedef const char* ccstr;
 typedef const char* ccstrlist;   // represents string arguments which accumulate
 
+// function type that will construct default range string
+typedef const char* (*RangeStrFunc)(void);
+
 struct Flag {
   enum Flags {
     // value origin
@@ -305,6 +308,14 @@
   static Flag* find_flag(const char* name, size_t length, bool allow_locked = false, bool return_flag = false);
   static Flag* fuzzy_match(const char* name, size_t length, bool allow_locked = false);
 
+  static const char* get_int_default_range_str();
+  static const char* get_uint_default_range_str();
+  static const char* get_intx_default_range_str();
+  static const char* get_uintx_default_range_str();
+  static const char* get_uint64_t_default_range_str();
+  static const char* get_size_t_default_range_str();
+  static const char* get_double_default_range_str();
+
   void check_writable();
 
   bool is_bool() const;
--- a/test/TEST.groups	Wed Mar 30 11:28:51 2016 -0500
+++ b/test/TEST.groups	Thu Mar 31 14:18:25 2016 +0000
@@ -310,10 +310,15 @@
 hotspot_compiler_closed = \
   sanity/ExecuteInternalVMTests.java
 
-hotspot_gc = \
+hotspot_gc_1 = \
+  gc/g1/
+
+hotspot_gc_2 = \
   sanity/ExecuteInternalVMTests.java \
   gc/ \
-  -gc/g1/TestGreyReclaimedHumongousObjects.java \
+  -gc/g1/ \
+  -gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java \
+  -gc/cms/TestMBeanCMS.java \
   -gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
 
 hotspot_gc_closed = \
@@ -361,7 +366,8 @@
   :hotspot_compiler_2 \
   :hotspot_compiler_3 \
   :hotspot_compiler_closed \
-  :hotspot_gc \
+  :hotspot_gc_1 \
+  :hotspot_gc_2 \
   :hotspot_gc_closed \
   :hotspot_gc_gcold \
   :hotspot_runtime \