27
28 #include "gc_implementation/shared/ageTable.hpp"
29 #include "gc_implementation/shared/cSpaceCounters.hpp"
30 #include "gc_implementation/shared/generationCounters.hpp"
31 #include "gc_implementation/shared/copyFailedInfo.hpp"
32 #include "memory/generation.inline.hpp"
33 #include "utilities/stack.hpp"
34
35 class EdenSpace;
36 class ContiguousSpace;
37 class ScanClosure;
38 class STWGCTimer;
39
40 // DefNewGeneration is a young generation containing eden, from- and
41 // to-space.
42
43 class DefNewGeneration: public Generation {
44 friend class VMStructs;
45
46 protected:
47 Generation* _next_gen;
48 uint _tenuring_threshold; // Tenuring threshold for next collection.
49 ageTable _age_table;
50 // Size of object to pretenure in words; command line provides bytes
51 size_t _pretenure_size_threshold_words;
52
53 ageTable* age_table() { return &_age_table; }
54
55 // Initialize state to optimistically assume no promotion failure will
56 // happen.
57 void init_assuming_no_promotion_failure();
58 // True iff a promotion has failed in the current collection.
59 bool _promotion_failed;
60 bool promotion_failed() { return _promotion_failed; }
61 PromotionFailedInfo _promotion_failed_info;
62
63 // Handling promotion failure. A young generation collection
64 // can fail if a live object cannot be copied out of its
65 // location in eden or from-space during the collection. If
66 // a collection fails, the young generation is left in a
67 // consistent state such that it can be collected by a
|
27
28 #include "gc_implementation/shared/ageTable.hpp"
29 #include "gc_implementation/shared/cSpaceCounters.hpp"
30 #include "gc_implementation/shared/generationCounters.hpp"
31 #include "gc_implementation/shared/copyFailedInfo.hpp"
32 #include "memory/generation.inline.hpp"
33 #include "utilities/stack.hpp"
34
35 class EdenSpace;
36 class ContiguousSpace;
37 class ScanClosure;
38 class STWGCTimer;
39
40 // DefNewGeneration is a young generation containing eden, from- and
41 // to-space.
42
43 class DefNewGeneration: public Generation {
44 friend class VMStructs;
45
46 protected:
47 Generation* _old_gen;
48 uint _tenuring_threshold; // Tenuring threshold for next collection.
49 ageTable _age_table;
50 // Size of object to pretenure in words; command line provides bytes
51 size_t _pretenure_size_threshold_words;
52
53 ageTable* age_table() { return &_age_table; }
54
55 // Initialize state to optimistically assume no promotion failure will
56 // happen.
57 void init_assuming_no_promotion_failure();
58 // True iff a promotion has failed in the current collection.
59 bool _promotion_failed;
60 bool promotion_failed() { return _promotion_failed; }
61 PromotionFailedInfo _promotion_failed_info;
62
63 // Handling promotion failure. A young generation collection
64 // can fail if a live object cannot be copied out of its
65 // location in eden or from-space during the collection. If
66 // a collection fails, the young generation is left in a
67 // consistent state such that it can be collected by a
|