33 #include "utilities/globalDefinitions.hpp"
34
35 //
36 // psPromotionManager is used by a single thread to manage object survival
37 // during a scavenge. The promotion manager contains thread local data only.
38 //
39 // NOTE! Be careful when allocating the stacks on cheap. If you are going
40 // to use a promotion manager in more than one thread, the stacks MUST be
41 // on cheap. This can lead to memory leaks, though, as they are not auto
42 // deallocated.
43 //
44 // FIX ME FIX ME Add a destructor, and don't rely on the user to drain/flush/deallocate!
45 //
46
47 class MutableSpace;
48 class PSOldGen;
49 class ParCompactionManager;
50
51 class PSPromotionManager {
52 friend class PSScavenge;
53 friend class PSRefProcTaskExecutor;
54 private:
55 static PaddedEnd<PSPromotionManager>* _manager_array;
56 static OopStarTaskQueueSet* _stack_array_depth;
57 static PreservedMarksSet* _preserved_marks_set;
58 static PSOldGen* _old_gen;
59 static MutableSpace* _young_space;
60
61 #if TASKQUEUE_STATS
62 size_t _masked_pushes;
63 size_t _masked_steals;
64 size_t _arrays_chunked;
65 size_t _array_chunks_processed;
66
67 void print_local_stats(outputStream* const out, uint i) const;
68 static void print_taskqueue_stats();
69
70 void reset_stats();
71 #endif // TASKQUEUE_STATS
72
|
33 #include "utilities/globalDefinitions.hpp"
34
35 //
36 // psPromotionManager is used by a single thread to manage object survival
37 // during a scavenge. The promotion manager contains thread local data only.
38 //
39 // NOTE! Be careful when allocating the stacks on cheap. If you are going
40 // to use a promotion manager in more than one thread, the stacks MUST be
41 // on cheap. This can lead to memory leaks, though, as they are not auto
42 // deallocated.
43 //
44 // FIX ME FIX ME Add a destructor, and don't rely on the user to drain/flush/deallocate!
45 //
46
47 class MutableSpace;
48 class PSOldGen;
49 class ParCompactionManager;
50
51 class PSPromotionManager {
52 friend class PSScavenge;
53 friend class ScavengeRootsTask;
54 friend class PSRefProcTaskExecutor;
55 friend class PSRefProcTask;
56
57 private:
58 static PaddedEnd<PSPromotionManager>* _manager_array;
59 static OopStarTaskQueueSet* _stack_array_depth;
60 static PreservedMarksSet* _preserved_marks_set;
61 static PSOldGen* _old_gen;
62 static MutableSpace* _young_space;
63
64 #if TASKQUEUE_STATS
65 size_t _masked_pushes;
66 size_t _masked_steals;
67 size_t _arrays_chunked;
68 size_t _array_chunks_processed;
69
70 void print_local_stats(outputStream* const out, uint i) const;
71 static void print_taskqueue_stats();
72
73 void reset_stats();
74 #endif // TASKQUEUE_STATS
75
|