8049426: Minor cleanups after G1 class unloading
authorehelin
Wed, 09 Jul 2014 16:44:30 +0200
changeset 25500 4d2e06147d1e
parent 25492 d27050bdfb04
child 25501 1e2ffa5a345d
child 25622 058307bdb07c
8049426: Minor cleanups after G1 class unloading Reviewed-by: stefank, brutisso
hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp
hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
hotspot/src/share/vm/oops/instanceKlass.cpp
hotspot/src/share/vm/utilities/array.hpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp	Mon Jul 07 10:12:40 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp	Wed Jul 09 16:44:30 2014 +0200
@@ -169,7 +169,7 @@
 
 void G1CodeRootSet::add(nmethod* method) {
   if (!contains(method)) {
-    // Find the first chunk thatisn't full.
+    // Find the first chunk that isn't full.
     G1CodeRootChunk* cur = _list.head();
     while (cur != NULL) {
       if (!cur->is_full()) {
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Mon Jul 07 10:12:40 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Jul 09 16:44:30 2014 +0200
@@ -5310,7 +5310,7 @@
     // Do first pass of code cache cleaning.
     _code_cache_task.work_first_pass(worker_id);
 
-    // Let the threads, mark that the first pass is done.
+    // Let the threads mark that the first pass is done.
     _code_cache_task.barrier_mark(worker_id);
 
     // Clean the Strings and Symbols.
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Mon Jul 07 10:12:40 2014 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Wed Jul 09 16:44:30 2014 +0200
@@ -1951,8 +1951,7 @@
     if (nm == b->get_nmethod()) {
 #ifdef ASSERT
       int count = b->count();
-      assert(count >= 0, "Just check if we ever get here 1");
-      assert(count > 0,  "Just check if we ever get here 2");
+      assert(count >= 0, err_msg("count shouldn't be negative: %d", count));
 #endif
       return true;
     }
--- a/hotspot/src/share/vm/utilities/array.hpp	Mon Jul 07 10:12:40 2014 +0200
+++ b/hotspot/src/share/vm/utilities/array.hpp	Wed Jul 09 16:44:30 2014 +0200
@@ -328,6 +328,8 @@
   static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }
 
   // WhiteBox API helper.
+  // Can't distinguish between array of length 0 and length 1,
+  // will always return 0 in those cases.
   static int bytes_to_length(size_t bytes)       {
     assert(is_size_aligned(bytes, BytesPerWord), "Must be, for now");