Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp @ 4095:bca17e38de00
6593758: RFE: Enhance GC ergonomics to dynamically choose ParallelGCThreads
Summary: Select number of GC threads dynamically based on heap usage and number of Java threads
Reviewed-by: johnc, ysr, jcoomes
author | jmasa |
---|---|
date | Tue, 09 Aug 2011 10:16:01 -0700 |
parents | a88de71c4e3a |
children | 00dd86e542eb |
comparison
equal
deleted
inserted
replaced
4094:3a298e04d914 | 4095:bca17e38de00 |
---|---|
87 private: | 87 private: |
88 // either equal to the number of parallel threads, if ParallelGCThreads | 88 // either equal to the number of parallel threads, if ParallelGCThreads |
89 // has been set, or 1 otherwise | 89 // has been set, or 1 otherwise |
90 int _parallel_gc_threads; | 90 int _parallel_gc_threads; |
91 | 91 |
92 // The number of GC threads currently active. | |
93 uintx _no_of_gc_threads; | |
94 | |
92 enum SomePrivateConstants { | 95 enum SomePrivateConstants { |
93 NumPrevPausesForHeuristics = 10 | 96 NumPrevPausesForHeuristics = 10 |
94 }; | 97 }; |
95 | 98 |
96 G1MMUTracker* _mmu_tracker; | 99 G1MMUTracker* _mmu_tracker; |
278 | 281 |
279 void adjust_concurrent_refinement(double update_rs_time, | 282 void adjust_concurrent_refinement(double update_rs_time, |
280 double update_rs_processed_buffers, | 283 double update_rs_processed_buffers, |
281 double goal_ms); | 284 double goal_ms); |
282 | 285 |
286 uintx no_of_gc_threads() { return _no_of_gc_threads; } | |
287 void set_no_of_gc_threads(uintx v) { _no_of_gc_threads = v; } | |
288 | |
283 double _pause_time_target_ms; | 289 double _pause_time_target_ms; |
284 double _recorded_young_cset_choice_time_ms; | 290 double _recorded_young_cset_choice_time_ms; |
285 double _recorded_non_young_cset_choice_time_ms; | 291 double _recorded_non_young_cset_choice_time_ms; |
286 size_t _pending_cards; | 292 size_t _pending_cards; |
287 size_t _max_pending_cards; | 293 size_t _max_pending_cards; |
288 | 294 |
289 public: | 295 public: |
296 // Accessors | |
290 | 297 |
291 void set_region_eden(HeapRegion* hr, int young_index_in_cset) { | 298 void set_region_eden(HeapRegion* hr, int young_index_in_cset) { |
292 hr->set_young(); | 299 hr->set_young(); |
293 hr->install_surv_rate_group(_short_lived_surv_rate_group); | 300 hr->install_surv_rate_group(_short_lived_surv_rate_group); |
294 hr->set_young_index_in_cset(young_index_in_cset); | 301 hr->set_young_index_in_cset(young_index_in_cset); |
735 | 742 |
736 void record_concurrent_mark_remark_start(); | 743 void record_concurrent_mark_remark_start(); |
737 void record_concurrent_mark_remark_end(); | 744 void record_concurrent_mark_remark_end(); |
738 | 745 |
739 void record_concurrent_mark_cleanup_start(); | 746 void record_concurrent_mark_cleanup_start(); |
740 void record_concurrent_mark_cleanup_end(); | 747 void record_concurrent_mark_cleanup_end(int no_of_gc_threads); |
741 void record_concurrent_mark_cleanup_completed(); | 748 void record_concurrent_mark_cleanup_completed(); |
742 | 749 |
743 void record_concurrent_pause(); | 750 void record_concurrent_pause(); |
744 void record_concurrent_pause_end(); | 751 void record_concurrent_pause_end(); |
745 | 752 |
746 void record_collection_pause_end(); | 753 void record_collection_pause_end(int no_of_gc_threads); |
747 void print_heap_transition(); | 754 void print_heap_transition(); |
748 | 755 |
749 // Record the fact that a full collection occurred. | 756 // Record the fact that a full collection occurred. |
750 void record_full_collection_start(); | 757 void record_full_collection_start(); |
751 void record_full_collection_end(); | 758 void record_full_collection_end(); |