27 #include "gc/parallel/mutableSpace.hpp"
28 #include "gc/parallel/parallelScavengeHeap.hpp"
29 #include "gc/parallel/psOldGen.hpp"
30 #include "gc/parallel/psPromotionManager.inline.hpp"
31 #include "gc/parallel/psScavenge.inline.hpp"
32 #include "gc/shared/continuationGCSupport.inline.hpp"
33 #include "gc/shared/gcTrace.hpp"
34 #include "gc/shared/partialArrayState.hpp"
35 #include "gc/shared/partialArrayTaskStepper.inline.hpp"
36 #include "gc/shared/preservedMarks.inline.hpp"
37 #include "gc/shared/taskqueue.inline.hpp"
38 #include "logging/log.hpp"
39 #include "logging/logStream.hpp"
40 #include "memory/allocation.inline.hpp"
41 #include "memory/iterator.inline.hpp"
42 #include "memory/memRegion.hpp"
43 #include "memory/padded.inline.hpp"
44 #include "memory/resourceArea.hpp"
45 #include "oops/access.inline.hpp"
46 #include "oops/compressedOops.inline.hpp"
47 #include "utilities/checkedCast.hpp"
48
49 PaddedEnd<PSPromotionManager>* PSPromotionManager::_manager_array = nullptr;
50 PSPromotionManager::PSScannerTasksQueueSet* PSPromotionManager::_stack_array_depth = nullptr;
51 PreservedMarksSet* PSPromotionManager::_preserved_marks_set = nullptr;
52 PSOldGen* PSPromotionManager::_old_gen = nullptr;
53 MutableSpace* PSPromotionManager::_young_space = nullptr;
54 PartialArrayStateAllocator* PSPromotionManager::_partial_array_state_allocator = nullptr;
55
56 void PSPromotionManager::initialize() {
57 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
58
59 _old_gen = heap->old_gen();
60 _young_space = heap->young_gen()->to_space();
61
62 const uint promotion_manager_num = ParallelGCThreads;
63
64 // To prevent false sharing, we pad the PSPromotionManagers
65 // and make sure that the first instance starts at a cache line.
66 assert(_manager_array == nullptr, "Attempt to initialize twice");
|
27 #include "gc/parallel/mutableSpace.hpp"
28 #include "gc/parallel/parallelScavengeHeap.hpp"
29 #include "gc/parallel/psOldGen.hpp"
30 #include "gc/parallel/psPromotionManager.inline.hpp"
31 #include "gc/parallel/psScavenge.inline.hpp"
32 #include "gc/shared/continuationGCSupport.inline.hpp"
33 #include "gc/shared/gcTrace.hpp"
34 #include "gc/shared/partialArrayState.hpp"
35 #include "gc/shared/partialArrayTaskStepper.inline.hpp"
36 #include "gc/shared/preservedMarks.inline.hpp"
37 #include "gc/shared/taskqueue.inline.hpp"
38 #include "logging/log.hpp"
39 #include "logging/logStream.hpp"
40 #include "memory/allocation.inline.hpp"
41 #include "memory/iterator.inline.hpp"
42 #include "memory/memRegion.hpp"
43 #include "memory/padded.inline.hpp"
44 #include "memory/resourceArea.hpp"
45 #include "oops/access.inline.hpp"
46 #include "oops/compressedOops.inline.hpp"
47 #include "oops/flatArrayKlass.inline.hpp"
48 #include "utilities/checkedCast.hpp"
49
50 PaddedEnd<PSPromotionManager>* PSPromotionManager::_manager_array = nullptr;
51 PSPromotionManager::PSScannerTasksQueueSet* PSPromotionManager::_stack_array_depth = nullptr;
52 PreservedMarksSet* PSPromotionManager::_preserved_marks_set = nullptr;
53 PSOldGen* PSPromotionManager::_old_gen = nullptr;
54 MutableSpace* PSPromotionManager::_young_space = nullptr;
55 PartialArrayStateAllocator* PSPromotionManager::_partial_array_state_allocator = nullptr;
56
57 void PSPromotionManager::initialize() {
58 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
59
60 _old_gen = heap->old_gen();
61 _young_space = heap->young_gen()->to_space();
62
63 const uint promotion_manager_num = ParallelGCThreads;
64
65 // To prevent false sharing, we pad the PSPromotionManagers
66 // and make sure that the first instance starts at a cache line.
67 assert(_manager_array == nullptr, "Attempt to initialize twice");
|