Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp @ 10370:47bdfb3d010f
8015486: PSScavenge::is_obj_in_young is unnecessarily slow with UseCompressedOops
Summary: 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
author | stefank |
---|---|
date | Thu, 30 May 2013 10:58:16 +0200 |
parents | 8dbc025ff709 |
children | f2110083203d |
comparison
equal
deleted
inserted
replaced
10369:5534bd30c151 | 10370:47bdfb3d010f |
---|---|
59 ReferenceProcessor* PSScavenge::_ref_processor = NULL; | 59 ReferenceProcessor* PSScavenge::_ref_processor = NULL; |
60 CardTableExtension* PSScavenge::_card_table = NULL; | 60 CardTableExtension* PSScavenge::_card_table = NULL; |
61 bool PSScavenge::_survivor_overflow = false; | 61 bool PSScavenge::_survivor_overflow = false; |
62 uint PSScavenge::_tenuring_threshold = 0; | 62 uint PSScavenge::_tenuring_threshold = 0; |
63 HeapWord* PSScavenge::_young_generation_boundary = NULL; | 63 HeapWord* PSScavenge::_young_generation_boundary = NULL; |
64 uintptr_t PSScavenge::_young_generation_boundary_compressed = 0; | |
64 elapsedTimer PSScavenge::_accumulated_time; | 65 elapsedTimer PSScavenge::_accumulated_time; |
65 Stack<markOop, mtGC> PSScavenge::_preserved_mark_stack; | 66 Stack<markOop, mtGC> PSScavenge::_preserved_mark_stack; |
66 Stack<oop, mtGC> PSScavenge::_preserved_oop_stack; | 67 Stack<oop, mtGC> PSScavenge::_preserved_oop_stack; |
67 CollectorCounters* PSScavenge::_counters = NULL; | 68 CollectorCounters* PSScavenge::_counters = NULL; |
68 bool PSScavenge::_promotion_failed = false; | 69 bool PSScavenge::_promotion_failed = false; |
69 | 70 |
70 // Define before use | 71 // Define before use |
71 class PSIsAliveClosure: public BoolObjectClosure { | 72 class PSIsAliveClosure: public BoolObjectClosure { |
72 public: | 73 public: |
73 bool do_object_b(oop p) { | 74 bool do_object_b(oop p) { |
74 return (!PSScavenge::is_obj_in_young((HeapWord*) p)) || p->is_forwarded(); | 75 return (!PSScavenge::is_obj_in_young(p)) || p->is_forwarded(); |
75 } | 76 } |
76 }; | 77 }; |
77 | 78 |
78 PSIsAliveClosure PSScavenge::_is_alive_closure; | 79 PSIsAliveClosure PSScavenge::_is_alive_closure; |
79 | 80 |
813 PSOldGen* old_gen = heap->old_gen(); | 814 PSOldGen* old_gen = heap->old_gen(); |
814 | 815 |
815 // Set boundary between young_gen and old_gen | 816 // Set boundary between young_gen and old_gen |
816 assert(old_gen->reserved().end() <= young_gen->eden_space()->bottom(), | 817 assert(old_gen->reserved().end() <= young_gen->eden_space()->bottom(), |
817 "old above young"); | 818 "old above young"); |
818 _young_generation_boundary = young_gen->eden_space()->bottom(); | 819 set_young_generation_boundary(young_gen->eden_space()->bottom()); |
819 | 820 |
820 // Initialize ref handling object for scavenging. | 821 // Initialize ref handling object for scavenging. |
821 MemRegion mr = young_gen->reserved(); | 822 MemRegion mr = young_gen->reserved(); |
822 | 823 |
823 _ref_processor = | 824 _ref_processor = |