Mercurial > hg > graal-compiler
comparison src/share/vm/prims/jvmtiTagMap.cpp @ 360:5d254928c888
Merge
author | ysr |
---|---|
date | Wed, 27 Aug 2008 11:20:46 -0700 |
parents | 1ee8caae33af |
children | e9be0e04635a |
comparison
equal
deleted
inserted
replaced
341:d60e4e6d7f72 | 360:5d254928c888 |
---|---|
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) { |