Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 1707:0ce1569c90e5
6963209: G1: remove the concept of abandoned pauses
Summary: As part of 6944166 we disabled the concept of abandoned pauses (i.e., if the collection set is empty, we would still try to do a pause even if it is to update the RSets and scan the roots). This changeset removes the code and structures associated with abandoned pauses.
Reviewed-by: iveresov, johnc
author | tonyp |
---|---|
date | Wed, 04 Aug 2010 13:03:23 -0400 |
parents | 2d160770d2e5 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1706:9d7a8ab3736b | 1707:0ce1569c90e5 |
---|---|
74 public MainBodySummary { | 74 public MainBodySummary { |
75 public: | 75 public: |
76 virtual MainBodySummary* main_body_summary() { return this; } | 76 virtual MainBodySummary* main_body_summary() { return this; } |
77 }; | 77 }; |
78 | 78 |
79 class AbandonedSummary: public PauseSummary { | |
80 }; | |
81 | |
82 class G1CollectorPolicy: public CollectorPolicy { | 79 class G1CollectorPolicy: public CollectorPolicy { |
83 protected: | 80 protected: |
84 // The number of pauses during the execution. | 81 // The number of pauses during the execution. |
85 long _n_pauses; | 82 long _n_pauses; |
86 | 83 |
146 TruncatedSeq* _concurrent_mark_init_times_ms; | 143 TruncatedSeq* _concurrent_mark_init_times_ms; |
147 TruncatedSeq* _concurrent_mark_remark_times_ms; | 144 TruncatedSeq* _concurrent_mark_remark_times_ms; |
148 TruncatedSeq* _concurrent_mark_cleanup_times_ms; | 145 TruncatedSeq* _concurrent_mark_cleanup_times_ms; |
149 | 146 |
150 Summary* _summary; | 147 Summary* _summary; |
151 AbandonedSummary* _abandoned_summary; | |
152 | 148 |
153 NumberSeq* _all_pause_times_ms; | 149 NumberSeq* _all_pause_times_ms; |
154 NumberSeq* _all_full_gc_times_ms; | 150 NumberSeq* _all_full_gc_times_ms; |
155 double _stop_world_start; | 151 double _stop_world_start; |
156 NumberSeq* _all_stop_world_times_ms; | 152 NumberSeq* _all_stop_world_times_ms; |
571 void check_other_times(int level, | 567 void check_other_times(int level, |
572 NumberSeq* other_times_ms, | 568 NumberSeq* other_times_ms, |
573 NumberSeq* calc_other_times_ms) const; | 569 NumberSeq* calc_other_times_ms) const; |
574 | 570 |
575 void print_summary (PauseSummary* stats) const; | 571 void print_summary (PauseSummary* stats) const; |
576 void print_abandoned_summary(PauseSummary* summary) const; | |
577 | 572 |
578 void print_summary (int level, const char* str, NumberSeq* seq) const; | 573 void print_summary (int level, const char* str, NumberSeq* seq) const; |
579 void print_summary_sd (int level, const char* str, NumberSeq* seq) const; | 574 void print_summary_sd (int level, const char* str, NumberSeq* seq) const; |
580 | 575 |
581 double avg_value (double* data); | 576 double avg_value (double* data); |
884 virtual void record_concurrent_pause_end(); | 879 virtual void record_concurrent_pause_end(); |
885 | 880 |
886 virtual void record_collection_pause_end_CH_strong_roots(); | 881 virtual void record_collection_pause_end_CH_strong_roots(); |
887 virtual void record_collection_pause_end_G1_strong_roots(); | 882 virtual void record_collection_pause_end_G1_strong_roots(); |
888 | 883 |
889 virtual void record_collection_pause_end(bool abandoned); | 884 virtual void record_collection_pause_end(); |
890 | 885 |
891 // Record the fact that a full collection occurred. | 886 // Record the fact that a full collection occurred. |
892 virtual void record_full_collection_start(); | 887 virtual void record_full_collection_start(); |
893 virtual void record_full_collection_end(); | 888 virtual void record_full_collection_end(); |
894 | 889 |
997 virtual bool should_do_collection_pause(size_t word_size) = 0; | 992 virtual bool should_do_collection_pause(size_t word_size) = 0; |
998 | 993 |
999 // Choose a new collection set. Marks the chosen regions as being | 994 // Choose a new collection set. Marks the chosen regions as being |
1000 // "in_collection_set", and links them together. The head and number of | 995 // "in_collection_set", and links them together. The head and number of |
1001 // the collection set are available via access methods. | 996 // the collection set are available via access methods. |
1002 virtual bool choose_collection_set(double target_pause_time_ms) = 0; | 997 virtual void choose_collection_set(double target_pause_time_ms) = 0; |
1003 | 998 |
1004 // The head of the list (via "next_in_collection_set()") representing the | 999 // The head of the list (via "next_in_collection_set()") representing the |
1005 // current collection set. | 1000 // current collection set. |
1006 HeapRegion* collection_set() { return _collection_set; } | 1001 HeapRegion* collection_set() { return _collection_set; } |
1007 | 1002 |
1254 class G1CollectorPolicy_BestRegionsFirst: public G1CollectorPolicy { | 1249 class G1CollectorPolicy_BestRegionsFirst: public G1CollectorPolicy { |
1255 CollectionSetChooser* _collectionSetChooser; | 1250 CollectionSetChooser* _collectionSetChooser; |
1256 // If the estimated is less then desirable, resize if possible. | 1251 // If the estimated is less then desirable, resize if possible. |
1257 void expand_if_possible(size_t numRegions); | 1252 void expand_if_possible(size_t numRegions); |
1258 | 1253 |
1259 virtual bool choose_collection_set(double target_pause_time_ms); | 1254 virtual void choose_collection_set(double target_pause_time_ms); |
1260 virtual void record_collection_pause_start(double start_time_sec, | 1255 virtual void record_collection_pause_start(double start_time_sec, |
1261 size_t start_used); | 1256 size_t start_used); |
1262 virtual void record_concurrent_mark_cleanup_end(size_t freed_bytes, | 1257 virtual void record_concurrent_mark_cleanup_end(size_t freed_bytes, |
1263 size_t max_live_bytes); | 1258 size_t max_live_bytes); |
1264 virtual void record_full_collection_end(); | 1259 virtual void record_full_collection_end(); |
1265 | 1260 |
1266 public: | 1261 public: |
1267 G1CollectorPolicy_BestRegionsFirst() { | 1262 G1CollectorPolicy_BestRegionsFirst() { |
1268 _collectionSetChooser = new CollectionSetChooser(); | 1263 _collectionSetChooser = new CollectionSetChooser(); |
1269 } | 1264 } |
1270 void record_collection_pause_end(bool abandoned); | 1265 void record_collection_pause_end(); |
1271 bool should_do_collection_pause(size_t word_size); | 1266 bool should_do_collection_pause(size_t word_size); |
1272 // This is not needed any more, after the CSet choosing code was | 1267 // This is not needed any more, after the CSet choosing code was |
1273 // changed to use the pause prediction work. But let's leave the | 1268 // changed to use the pause prediction work. But let's leave the |
1274 // hook in just in case. | 1269 // hook in just in case. |
1275 void note_change_in_marked_bytes(HeapRegion* r) { } | 1270 void note_change_in_marked_bytes(HeapRegion* r) { } |