8015486: PSScavenge::is_obj_in_young is unnecessarily slow with UseCompressedOops

Compare compressed oops to a compressed young gen boundary instead of uncompressing the oops before doing the young gen boundary check.

Reviewed-by: brutisso, jmasa
This commit is contained in:
Stefan Karlsson 2013-05-30 10:58:16 +02:00
parent de314e391b
commit c39235c377
4 changed files with 35 additions and 22 deletions

View file

@ -42,7 +42,7 @@ inline void PSPromotionManager::claim_or_forward_internal_depth(T* p) {
if (o->is_forwarded()) {
o = o->forwardee();
// Card mark
if (PSScavenge::is_obj_in_young((HeapWord*) o)) {
if (PSScavenge::is_obj_in_young(o)) {
PSScavenge::card_table()->inline_write_ref_field_gc(p, o);
}
oopDesc::encode_store_heap_oop_not_null(p, o);