Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/shared/allocationStats.hpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 4ca6dc0799b6 78bbf4d43a14 |
children |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
105 ssize_t demand = prev_sweep() - (ssize_t)count + split_births() + coal_births() | 105 ssize_t demand = prev_sweep() - (ssize_t)count + split_births() + coal_births() |
106 - split_deaths() - coal_deaths(); | 106 - split_deaths() - coal_deaths(); |
107 assert(demand >= 0, | 107 assert(demand >= 0, |
108 err_msg("Demand (" SSIZE_FORMAT ") should be non-negative for " | 108 err_msg("Demand (" SSIZE_FORMAT ") should be non-negative for " |
109 PTR_FORMAT " (size=" SIZE_FORMAT ")", | 109 PTR_FORMAT " (size=" SIZE_FORMAT ")", |
110 demand, this, count)); | 110 demand, p2i(this), count)); |
111 // Defensive: adjust for imprecision in event counting | 111 // Defensive: adjust for imprecision in event counting |
112 if (demand < 0) { | 112 if (demand < 0) { |
113 demand = 0; | 113 demand = 0; |
114 } | 114 } |
115 float old_rate = _demand_rate_estimate.padded_average(); | 115 float old_rate = _demand_rate_estimate.padded_average(); |
118 float new_rate = _demand_rate_estimate.padded_average(); | 118 float new_rate = _demand_rate_estimate.padded_average(); |
119 ssize_t old_desired = _desired; | 119 ssize_t old_desired = _desired; |
120 float delta_ise = (CMSExtrapolateSweep ? intra_sweep_estimate : 0.0); | 120 float delta_ise = (CMSExtrapolateSweep ? intra_sweep_estimate : 0.0); |
121 _desired = (ssize_t)(new_rate * (inter_sweep_estimate + delta_ise)); | 121 _desired = (ssize_t)(new_rate * (inter_sweep_estimate + delta_ise)); |
122 if (PrintFLSStatistics > 1) { | 122 if (PrintFLSStatistics > 1) { |
123 gclog_or_tty->print_cr("demand: %d, old_rate: %f, current_rate: %f, new_rate: %f, old_desired: %d, new_desired: %d", | 123 gclog_or_tty->print_cr( |
124 demand, old_rate, rate, new_rate, old_desired, _desired); | 124 "demand: " SSIZE_FORMAT ", old_rate: %f, current_rate: %f, new_rate: %f, old_desired: " SSIZE_FORMAT ", new_desired: " SSIZE_FORMAT, |
125 demand, old_rate, rate, new_rate, old_desired, _desired); | |
125 } | 126 } |
126 } | 127 } |
127 } | 128 } |
128 | 129 |
129 ssize_t desired() const { return _desired; } | 130 ssize_t desired() const { return _desired; } |