comparison src/share/vm/gc_implementation/shared/gcUtil.cpp @ 1145:e018e6884bd8

6631166: CMS: better heuristics when combatting fragmentation Summary: Autonomic per-worker free block cache sizing, tunable coalition policies, fixes to per-size block statistics, retuned gain and bandwidth of some feedback loop filters to allow quicker reactivity to abrupt changes in ambient demand, and other heuristics to reduce fragmentation of the CMS old gen. Also tightened some assertions, including those related to locking. Reviewed-by: jmasa
author ysr
date Wed, 23 Dec 2009 09:23:54 -0800
parents a61af66fc99e
children c18cbe5936b8
comparison
equal deleted inserted replaced
1111:44f61c24ddab 1145:e018e6884bd8
50 float new_avg = compute_adaptive_average(new_sample, average()); 50 float new_avg = compute_adaptive_average(new_sample, average());
51 set_average(new_avg); 51 set_average(new_avg);
52 _last_sample = new_sample; 52 _last_sample = new_sample;
53 } 53 }
54 54
55 void AdaptiveWeightedAverage::print() const {
56 print_on(tty);
57 }
58
59 void AdaptiveWeightedAverage::print_on(outputStream* st) const {
60 guarantee(false, "NYI");
61 }
62
63 void AdaptivePaddedAverage::print() const {
64 print_on(tty);
65 }
66
67 void AdaptivePaddedAverage::print_on(outputStream* st) const {
68 guarantee(false, "NYI");
69 }
70
71 void AdaptivePaddedNoZeroDevAverage::print() const {
72 print_on(tty);
73 }
74
75 void AdaptivePaddedNoZeroDevAverage::print_on(outputStream* st) const {
76 guarantee(false, "NYI");
77 }
78
55 void AdaptivePaddedAverage::sample(float new_sample) { 79 void AdaptivePaddedAverage::sample(float new_sample) {
56 // Compute our parent classes sample information 80 // Compute new adaptive weighted average based on new sample.
57 AdaptiveWeightedAverage::sample(new_sample); 81 AdaptiveWeightedAverage::sample(new_sample);
58 82
59 // Now compute the deviation and the new padded sample 83 // Now update the deviation and the padded average.
60 float new_avg = average(); 84 float new_avg = average();
61 float new_dev = compute_adaptive_average(fabsd(new_sample - new_avg), 85 float new_dev = compute_adaptive_average(fabsd(new_sample - new_avg),
62 deviation()); 86 deviation());
63 set_deviation(new_dev); 87 set_deviation(new_dev);
64 set_padded_average(new_avg + padding() * new_dev); 88 set_padded_average(new_avg + padding() * new_dev);