diff src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents d2a62e0f25eb
children f81a7c0c618d
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Fri Aug 31 16:39:35 2012 -0700
+++ b/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	Sat Sep 01 13:25:18 2012 -0400
@@ -284,7 +284,6 @@
 
   PSYoungGen* young_gen = heap->young_gen();
   PSOldGen* old_gen = heap->old_gen();
-  PSPermGen* perm_gen = heap->perm_gen();
   PSAdaptiveSizePolicy* size_policy = heap->size_policy();
   heap->increment_total_collections();
 
@@ -338,7 +337,6 @@
     if (VerifyObjectStartArray &&
         VerifyBeforeGC) {
       old_gen->verify_object_start_array();
-      perm_gen->verify_object_start_array();
     }
 
     // Verify no unmarked old->young roots
@@ -370,12 +368,11 @@
     // Reset our survivor overflow.
     set_survivor_overflow(false);
 
-    // We need to save the old/perm top values before
+    // We need to save the old top values before
     // creating the promotion_manager. We pass the top
     // values to the card_table, to prevent it from
     // straying into the promotion labs.
     HeapWord* old_top = old_gen->object_space()->top();
-    HeapWord* perm_top = perm_gen->object_space()->top();
 
     // Release all previously held resources
     gc_task_manager()->release_all_resources();
@@ -403,8 +400,6 @@
         q->enqueue(new OldToYoungRootsTask(old_gen, old_top, i, stripe_total));
       }
 
-      q->enqueue(new SerialOldToYoungRootsTask(perm_gen, perm_top));
-
       q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::universe));
       q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::jni_handles));
       // We scan the thread roots in parallel
@@ -454,13 +449,11 @@
       reference_processor()->enqueue_discovered_references(NULL);
     }
 
-    if (!JavaObjectsInPerm) {
       // Unlink any dead interned Strings
       StringTable::unlink(&_is_alive_closure);
       // Process the remaining live ones
       PSScavengeRootsClosure root_closure(promotion_manager);
       StringTable::oops_do(&root_closure);
-    }
 
     // Finally, flush the promotion_manager's labs, and deallocate its stacks.
     PSPromotionManager::post_scavenge();
@@ -503,10 +496,8 @@
                          heap->total_collections());
 
           if (Verbose) {
-            gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d"
-              " perm_gen_capacity: %d ",
-              old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes(),
-              perm_gen->capacity_in_bytes());
+            gclog_or_tty->print("old_gen_capacity: %d young_gen_capacity: %d",
+              old_gen->capacity_in_bytes(), young_gen->capacity_in_bytes());
           }
         }
 
@@ -564,7 +555,6 @@
           size_policy->compute_generation_free_space(young_gen->used_in_bytes(),
                                    young_gen->eden_space()->used_in_bytes(),
                                    old_gen->used_in_bytes(),
-                                   perm_gen->used_in_bytes(),
                                    young_gen->eden_space()->capacity_in_bytes(),
                                    old_gen->max_gen_size(),
                                    max_eden_size,
@@ -614,7 +604,6 @@
     if (VerifyObjectStartArray &&
         VerifyAfterGC) {
       old_gen->verify_object_start_array();
-      perm_gen->verify_object_start_array();
     }
 
     // Verify all old -> young cards are now precise
@@ -810,11 +799,8 @@
 
   PSYoungGen* young_gen = heap->young_gen();
   PSOldGen* old_gen = heap->old_gen();
-  PSPermGen* perm_gen = heap->perm_gen();
 
   // Set boundary between young_gen and old_gen
-  assert(perm_gen->reserved().end() <= old_gen->object_space()->bottom(),
-         "perm above old");
   assert(old_gen->reserved().end() <= young_gen->eden_space()->bottom(),
          "old above young");
   _young_generation_boundary = young_gen->eden_space()->bottom();