Merge
authorjwilhelm
Mon, 09 Mar 2015 01:58:59 +0100
changeset 29467 e6a180c1fbf8
parent 29362 4188dc7f05a8 (current diff)
parent 29466 06fb7dbdbce7 (diff)
child 29468 fb61ea6af339
Merge
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -549,7 +549,7 @@
       FLAG_SET_DEFAULT(ConcGCThreads, (ParallelGCThreads + 3)/4);
     }
     if (ConcGCThreads > 1) {
-      _conc_workers = new YieldingFlexibleWorkGang("Parallel CMS Threads",
+      _conc_workers = new YieldingFlexibleWorkGang("CMS Thread",
                                  ConcGCThreads, true);
       if (_conc_workers == NULL) {
         warning("GC/CMS: _conc_workers allocation failure: "
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -65,7 +65,7 @@
   assert(_collector == NULL, "Collector already set");
   _collector = collector;
 
-  set_name("Concurrent Mark-Sweep GC Thread");
+  set_name("CMS Main Thread");
 
   if (os::create_thread(this, os::cgc_thread)) {
     // An old comment here said: "Priority should be just less
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -61,7 +61,7 @@
   create_and_start();
 
   // set name
-  set_name("G1 Concurrent Refinement Thread#%d", worker_id);
+  set_name("G1 Refine#%d", worker_id);
 }
 
 void ConcurrentG1RefineThread::initialize() {
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -687,7 +687,7 @@
   gclog_or_tty->print_cr("CL Sleep Factor          %1.4lf", cleanup_sleep_factor());
 #endif
 
-  _parallel_workers = new FlexibleWorkGang("G1 Parallel Marking Threads",
+  _parallel_workers = new FlexibleWorkGang("G1 Marker",
        _max_parallel_marking_threads, false, true);
   if (_parallel_workers == NULL) {
     vm_exit_during_initialization("Failed necessary allocation.");
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -48,7 +48,7 @@
   _vtime_accum(0.0),
   _vtime_mark_accum(0.0) {
 
-  set_name("G1 Main Concurrent Mark GC Thread");
+  set_name("G1 Main Marker");
   create_and_start();
 }
 
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp	Mon Mar 09 01:58:59 2015 +0100
@@ -110,6 +110,7 @@
   void         empty_list();
   bool         is_empty() { return _length == 0; }
   uint         length() { return _length; }
+  uint         eden_length() { return length() - survivor_length(); }
   uint         survivor_length() { return _survivor_length; }
 
   // Currently we do not keep track of the used byte sum for the
@@ -119,7 +120,7 @@
   // we'll report the more accurate information then.
   size_t       eden_used_bytes() {
     assert(length() >= survivor_length(), "invariant");
-    return (size_t) (length() - survivor_length()) * HeapRegion::GrainBytes;
+    return (size_t) eden_length() * HeapRegion::GrainBytes;
   }
   size_t       survivor_used_bytes() {
     return (size_t) survivor_length() * HeapRegion::GrainBytes;
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -537,15 +537,12 @@
 
   // This is how many young regions we already have (currently: the survivors).
   uint base_min_length = recorded_survivor_regions();
-  // This is the absolute minimum young length, which ensures that we
-  // can allocate one eden region in the worst-case.
-  uint absolute_min_length = base_min_length + 1;
-  uint desired_min_length =
-                     calculate_young_list_desired_min_length(base_min_length);
-  if (desired_min_length < absolute_min_length) {
-    desired_min_length = absolute_min_length;
-  }
-
+  uint desired_min_length = calculate_young_list_desired_min_length(base_min_length);
+  // This is the absolute minimum young length. Ensure that we
+  // will at least have one eden region available for allocation.
+  uint absolute_min_length = base_min_length + MAX2(_g1->young_list()->eden_length(), (uint)1);
+  // If we shrank the young list target it should not shrink below the current size.
+  desired_min_length = MAX2(desired_min_length, absolute_min_length);
   // Calculate the absolute and desired max bounds.
 
   // We will try our best not to "eat" into the reserve.
@@ -1925,7 +1922,7 @@
   //   [Newly Young Regions ++ Survivors from last pause].
 
   uint survivor_region_length = young_list->survivor_length();
-  uint eden_region_length = young_list->length() - survivor_region_length;
+  uint eden_region_length = young_list->eden_length();
   init_cset_region_lengths(eden_region_length, survivor_region_length);
 
   HeapRegion* hr = young_list->first_survivor_region();
--- a/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupThread.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -34,7 +34,7 @@
 
 G1StringDedupThread::G1StringDedupThread() :
   ConcurrentGCThread() {
-  set_name("String Deduplication Thread");
+  set_name("G1 StrDedup");
   create_and_start();
 }
 
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -53,7 +53,7 @@
     guarantee(_time_stamps != NULL, "Sanity");
   }
   set_id(which);
-  set_name("GC task thread#%d (ParallelGC)", which);
+  set_name("ParGC Thread#%d", which);
 }
 
 GCTaskThread::~GCTaskThread() {
--- a/hotspot/src/share/vm/memory/sharedHeap.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/memory/sharedHeap.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -68,7 +68,7 @@
   }
   _sh = this;  // ch is static, should be set only once.
   if (UseConcMarkSweepGC || UseG1GC) {
-    _workers = new FlexibleWorkGang("Parallel GC Threads", ParallelGCThreads,
+    _workers = new FlexibleWorkGang("GC Thread", ParallelGCThreads,
                             /* are_GC_task_threads */true,
                             /* are_ConcurrentGC_threads */false);
     if (_workers == NULL) {
--- a/hotspot/src/share/vm/utilities/workgroup.cpp	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/src/share/vm/utilities/workgroup.cpp	Mon Mar 09 01:58:59 2015 +0100
@@ -236,7 +236,7 @@
 GangWorker::GangWorker(AbstractWorkGang* gang, uint id) {
   _gang = gang;
   set_id(id);
-  set_name("Gang worker#%d (%s)", id, gang->name());
+  set_name("%s#%d", gang->name(), id);
 }
 
 void GangWorker::run() {
--- a/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java	Fri Mar 06 04:58:52 2015 -0800
+++ b/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java	Mon Mar 09 01:58:59 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -22,7 +22,6 @@
  */
 
 /**
- * @ignore 8019361
  * @test TestDynShrinkHeap
  * @bug 8016479
  * @requires vm.gc=="Parallel" | vm.gc=="null"
@@ -35,7 +34,7 @@
 import java.lang.management.MemoryUsage;
 import java.util.ArrayList;
 import sun.management.ManagementFactoryHelper;
-import static com.oracle.java.testlibrary.Asserts.*;
+import static com.oracle.java.testlibrary.Asserts.assertLessThan;
 
 public class TestDynShrinkHeap {