Mercurial > hg > graal-compiler
diff src/share/vm/prims/jvmtiTagMap.cpp @ 360:5d254928c888
Merge
author | ysr |
---|---|
date | Wed, 27 Aug 2008 11:20:46 -0700 |
parents | 1ee8caae33af |
children | e9be0e04635a |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiTagMap.cpp Wed Aug 27 10:56:33 2008 -0700 +++ b/src/share/vm/prims/jvmtiTagMap.cpp Wed Aug 27 11:20:46 2008 -0700 @@ -400,16 +400,28 @@ // get the memory region used for the young generation void JvmtiTagMap::get_young_generation() { - if (Universe::heap()->kind() == CollectedHeap::GenCollectedHeap) { - GenCollectedHeap* gch = GenCollectedHeap::heap(); - _young_gen = gch->get_gen(0)->reserved(); - } else { + CollectedHeap* ch = Universe::heap(); + switch (ch->kind()) { + case (CollectedHeap::GenCollectedHeap): { + _young_gen = ((GenCollectedHeap*)ch)->get_gen(0)->reserved(); + break; + } #ifndef SERIALGC - ParallelScavengeHeap* psh = ParallelScavengeHeap::heap(); - _young_gen= psh->young_gen()->reserved(); -#else // SERIALGC - fatal("SerialGC only supported in this configuration."); -#endif // SERIALGC + case (CollectedHeap::ParallelScavengeHeap): { + _young_gen = ((ParallelScavengeHeap*)ch)->young_gen()->reserved(); + break; + } + case (CollectedHeap::G1CollectedHeap): { + // Until a more satisfactory solution is implemented, all + // oops in the tag map will require rehash at each gc. + // This is a correct, if extremely inefficient solution. + // See RFE 6621729 for related commentary. + _young_gen = ch->reserved_region(); + break; + } +#endif // !SERIALGC + default: + ShouldNotReachHere(); } }