53 #include "services/memoryService.hpp"
54 #include "utilities/stack.inline.hpp"
55
56
57 HeapWord* PSScavenge::_to_space_top_before_gc = NULL;
58 int PSScavenge::_consecutive_skipped_scavenges = 0;
59 ReferenceProcessor* PSScavenge::_ref_processor = NULL;
60 CardTableExtension* PSScavenge::_card_table = NULL;
61 bool PSScavenge::_survivor_overflow = false;
62 uint PSScavenge::_tenuring_threshold = 0;
63 HeapWord* PSScavenge::_young_generation_boundary = NULL;
64 elapsedTimer PSScavenge::_accumulated_time;
65 Stack<markOop, mtGC> PSScavenge::_preserved_mark_stack;
66 Stack<oop, mtGC> PSScavenge::_preserved_oop_stack;
67 CollectorCounters* PSScavenge::_counters = NULL;
68 bool PSScavenge::_promotion_failed = false;
69
70 // Define before use
71 class PSIsAliveClosure: public BoolObjectClosure {
72 public:
73 void do_object(oop p) {
74 assert(false, "Do not call.");
75 }
76 bool do_object_b(oop p) {
77 return (!PSScavenge::is_obj_in_young((HeapWord*) p)) || p->is_forwarded();
78 }
79 };
80
81 PSIsAliveClosure PSScavenge::_is_alive_closure;
82
83 class PSKeepAliveClosure: public OopClosure {
84 protected:
85 MutableSpace* _to_space;
86 PSPromotionManager* _promotion_manager;
87
88 public:
89 PSKeepAliveClosure(PSPromotionManager* pm) : _promotion_manager(pm) {
90 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
91 assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
92 _to_space = heap->young_gen()->to_space();
93
94 assert(_promotion_manager != NULL, "Sanity");
95 }
|
53 #include "services/memoryService.hpp"
54 #include "utilities/stack.inline.hpp"
55
56
57 HeapWord* PSScavenge::_to_space_top_before_gc = NULL;
58 int PSScavenge::_consecutive_skipped_scavenges = 0;
59 ReferenceProcessor* PSScavenge::_ref_processor = NULL;
60 CardTableExtension* PSScavenge::_card_table = NULL;
61 bool PSScavenge::_survivor_overflow = false;
62 uint PSScavenge::_tenuring_threshold = 0;
63 HeapWord* PSScavenge::_young_generation_boundary = NULL;
64 elapsedTimer PSScavenge::_accumulated_time;
65 Stack<markOop, mtGC> PSScavenge::_preserved_mark_stack;
66 Stack<oop, mtGC> PSScavenge::_preserved_oop_stack;
67 CollectorCounters* PSScavenge::_counters = NULL;
68 bool PSScavenge::_promotion_failed = false;
69
70 // Define before use
71 class PSIsAliveClosure: public BoolObjectClosure {
72 public:
73 bool do_object_b(oop p) {
74 return (!PSScavenge::is_obj_in_young((HeapWord*) p)) || p->is_forwarded();
75 }
76 };
77
78 PSIsAliveClosure PSScavenge::_is_alive_closure;
79
80 class PSKeepAliveClosure: public OopClosure {
81 protected:
82 MutableSpace* _to_space;
83 PSPromotionManager* _promotion_manager;
84
85 public:
86 PSKeepAliveClosure(PSPromotionManager* pm) : _promotion_manager(pm) {
87 ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap();
88 assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
89 _to_space = heap->young_gen()->to_space();
90
91 assert(_promotion_manager != NULL, "Sanity");
92 }
|