comparison src/share/vm/utilities/globalDefinitions.hpp @ 6059:3a22b77e755a

7161545: G1: Minor cleanups to the G1 logging Summary: Rename "to-space-overflow" to "to-space-exhausted", Introduce one decimal point in the size format, Add Sum to the aggregate and re-order the entries, Add number of GC workers to the log output Reviewed-by: johnc, jwilhelm
author brutisso
date Mon, 14 May 2012 17:32:17 +0200
parents 94ec88ca68e2
children cdfa5139bd58
comparison
equal deleted inserted replaced
6054:56d1af561395 6059:3a22b77e755a
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
186 } else { 186 } else {
187 return "B"; 187 return "B";
188 } 188 }
189 } 189 }
190 190
191 inline size_t byte_size_in_proper_unit(size_t s) { 191 template <class T>
192 inline T byte_size_in_proper_unit(T s) {
192 if (s >= 10*M) { 193 if (s >= 10*M) {
193 return s/M; 194 return (T)(s/M);
194 } else if (s >= 10*K) { 195 } else if (s >= 10*K) {
195 return s/K; 196 return (T)(s/K);
196 } else { 197 } else {
197 return s; 198 return s;
198 } 199 }
199 } 200 }
200
201 201
202 //---------------------------------------------------------------------------------------------------- 202 //----------------------------------------------------------------------------------------------------
203 // VM type definitions 203 // VM type definitions
204 204
205 // intx and uintx are the 'extended' int and 'extended' unsigned int types; 205 // intx and uintx are the 'extended' int and 'extended' unsigned int types;