Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1ParScanThreadState.inline.hpp @ 20296:a3953c777565
8027959: Early reclamation of large objects in G1
Summary: Try to reclaim humongous objects at every young collection after doing a conservative estimate of its liveness.
Reviewed-by: brutisso, mgerdin
author | tschatzl |
---|---|
date | Wed, 23 Jul 2014 09:03:32 +0200 |
parents | a2328cbebb23 |
children | 6948da6d7c13 |
comparison
equal
deleted
inserted
replaced
20295:3f2894c5052e | 20296:a3953c777565 |
---|---|
50 | 50 |
51 // Although we never intentionally push references outside of the collection | 51 // Although we never intentionally push references outside of the collection |
52 // set, due to (benign) races in the claim mechanism during RSet scanning more | 52 // set, due to (benign) races in the claim mechanism during RSet scanning more |
53 // than one thread might claim the same card. So the same card may be | 53 // than one thread might claim the same card. So the same card may be |
54 // processed multiple times. So redo this check. | 54 // processed multiple times. So redo this check. |
55 if (_g1h->in_cset_fast_test(obj)) { | 55 G1CollectedHeap::in_cset_state_t in_cset_state = _g1h->in_cset_state(obj); |
56 if (in_cset_state == G1CollectedHeap::InCSet) { | |
56 oop forwardee; | 57 oop forwardee; |
57 if (obj->is_forwarded()) { | 58 if (obj->is_forwarded()) { |
58 forwardee = obj->forwardee(); | 59 forwardee = obj->forwardee(); |
59 } else { | 60 } else { |
60 forwardee = copy_to_survivor_space(obj); | 61 forwardee = copy_to_survivor_space(obj); |
61 } | 62 } |
62 assert(forwardee != NULL, "forwardee should not be NULL"); | |
63 oopDesc::encode_store_heap_oop(p, forwardee); | 63 oopDesc::encode_store_heap_oop(p, forwardee); |
64 } else if (in_cset_state == G1CollectedHeap::IsHumongous) { | |
65 _g1h->set_humongous_is_live(obj); | |
66 } else { | |
67 assert(in_cset_state == G1CollectedHeap::InNeither, | |
68 err_msg("In_cset_state must be InNeither here, but is %d", in_cset_state)); | |
64 } | 69 } |
65 | 70 |
66 assert(obj != NULL, "Must be"); | 71 assert(obj != NULL, "Must be"); |
67 update_rs(from, p, queue_num()); | 72 update_rs(from, p, queue_num()); |
68 } | 73 } |