comparison src/share/vm/prims/jvmtiTagMap.cpp @ 342:37f87013dfd8

6711316: Open source the Garbage-First garbage collector Summary: First mercurial integration of the code for the Garbage-First garbage collector. Reviewed-by: apetrusenko, iveresov, jmasa, sgoldman, tonyp, ysr
author ysr
date Thu, 05 Jun 2008 15:57:56 -0700
parents ba764ed4b6f2
children 1ee8caae33af
comparison
equal deleted inserted replaced
189:0b27f3512f9e 342:37f87013dfd8
398 // memory region for young generation 398 // memory region for young generation
399 MemRegion JvmtiTagMap::_young_gen; 399 MemRegion JvmtiTagMap::_young_gen;
400 400
401 // get the memory region used for the young generation 401 // get the memory region used for the young generation
402 void JvmtiTagMap::get_young_generation() { 402 void JvmtiTagMap::get_young_generation() {
403 if (Universe::heap()->kind() == CollectedHeap::GenCollectedHeap) { 403 CollectedHeap* ch = Universe::heap();
404 GenCollectedHeap* gch = GenCollectedHeap::heap(); 404 switch (ch->kind()) {
405 _young_gen = gch->get_gen(0)->reserved(); 405 case (CollectedHeap::GenCollectedHeap): {
406 } else { 406 _young_gen = ((GenCollectedHeap*)ch)->get_gen(0)->reserved();
407 break;
408 }
407 #ifndef SERIALGC 409 #ifndef SERIALGC
408 ParallelScavengeHeap* psh = ParallelScavengeHeap::heap(); 410 case (CollectedHeap::ParallelScavengeHeap): {
409 _young_gen= psh->young_gen()->reserved(); 411 _young_gen = ((ParallelScavengeHeap*)ch)->young_gen()->reserved();
410 #else // SERIALGC 412 break;
411 fatal("SerialGC only supported in this configuration."); 413 }
412 #endif // SERIALGC 414 case (CollectedHeap::G1CollectedHeap): {
415 // Until a more satisfactory solution is implemented, all
416 // oops in the tag map will require rehash at each gc.
417 // This is a correct, if extremely inefficient solution.
418 // See RFE 6621729 for related commentary.
419 _young_gen = ch->reserved_region();
420 break;
421 }
422 #endif // !SERIALGC
423 default:
424 ShouldNotReachHere();
413 } 425 }
414 } 426 }
415 427
416 // returns true if oop is in the young generation 428 // returns true if oop is in the young generation
417 inline bool JvmtiTagMap::is_in_young(oop o) { 429 inline bool JvmtiTagMap::is_in_young(oop o) {