Mercurial > hg > truffle
comparison src/share/vm/utilities/numberSeq.cpp @ 1086:89f1b9ae8991
6898948: G1: forensic instrumentation for out-of-bounds recent_avg_pause_time_ratio()
Summary: Added instrumentation and (temporary) assert in non-product mode; clipped the value when found out-of-bounds in product mode. Fix of original issue will follow collection of data from this instrumentation.
Reviewed-by: jcoomes, tonyp
author | ysr |
---|---|
date | Fri, 13 Nov 2009 11:55:26 -0800 |
parents | 37f87013dfd8 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1085:0e2d7ae2bc67 | 1086:89f1b9ae8991 |
---|---|
239 double b1 = Sxy / Sxx; | 239 double b1 = Sxy / Sxx; |
240 double b0 = y_avg - b1 * x_avg; | 240 double b0 = y_avg - b1 * x_avg; |
241 | 241 |
242 return b0 + b1 * num; | 242 return b0 + b1 * num; |
243 } | 243 } |
244 | |
245 | |
246 // Printing/Debugging Support | |
247 | |
248 void AbsSeq::dump() { dump_on(gclog_or_tty); } | |
249 | |
250 void AbsSeq::dump_on(outputStream* s) { | |
251 s->print_cr("\t _num = %d, _sum = %7.3f, _sum_of_squares = %7.3f", | |
252 _num, _sum, _sum_of_squares); | |
253 s->print_cr("\t _davg = %7.3f, _dvariance = %7.3f, _alpha = %7.3f", | |
254 _davg, _dvariance, _alpha); | |
255 } | |
256 | |
257 void NumberSeq::dump_on(outputStream* s) { | |
258 AbsSeq::dump_on(s); | |
259 s->print_cr("\t\t _last = %7.3f, _maximum = %7.3f"); | |
260 } | |
261 | |
262 void TruncatedSeq::dump_on(outputStream* s) { | |
263 AbsSeq::dump_on(s); | |
264 s->print_cr("\t\t _length = %d, _next = %d", _length, _next); | |
265 for (int i = 0; i < _length; i++) { | |
266 if (i%5 == 0) { | |
267 s->cr(); | |
268 s->print("\t"); | |
269 } | |
270 s->print("\t[%d]=%7.3f", i, _sequence[i]); | |
271 } | |
272 s->print_cr(""); | |
273 } |