equal
deleted
inserted
replaced
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(); |