src/share/vm/utilities/globalDefinitions.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-g1-logging-minor-changes2 Cdiff src/share/vm/utilities/globalDefinitions.hpp

src/share/vm/utilities/globalDefinitions.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 177,206 **** const jlong NANOSECS_PER_SEC = CONST64(1000000000); const jint NANOSECS_PER_MILLISEC = 1000000; inline const char* proper_unit_for_byte_size(size_t s) { ! if (s >= 10*M) { return "M"; } else if (s >= 10*K) { return "K"; } else { return "B"; } } ! inline size_t byte_size_in_proper_unit(size_t s) { ! if (s >= 10*M) { ! return s/M; } else if (s >= 10*K) { ! return s/K; } else { return s; } } - //---------------------------------------------------------------------------------------------------- // VM type definitions // intx and uintx are the 'extended' int and 'extended' unsigned int types; // they are 32bit wide on a 32-bit platform, and 64bit wide on a 64bit platform. --- 177,210 ---- const jlong NANOSECS_PER_SEC = CONST64(1000000000); const jint NANOSECS_PER_MILLISEC = 1000000; inline const char* proper_unit_for_byte_size(size_t s) { ! if (s >= 10*G) { ! return "G"; ! } else if (s >= 10*M) { return "M"; } else if (s >= 10*K) { return "K"; } else { return "B"; } } ! template <class T> ! inline T byte_size_in_proper_unit(T s) { ! if (s >= 10*G) { ! return (T)(s/G); ! } else if (s >= 10*M) { ! return (T)(s/M); } else if (s >= 10*K) { ! return (T)(s/K); } else { return s; } } //---------------------------------------------------------------------------------------------------- // VM type definitions // intx and uintx are the 'extended' int and 'extended' unsigned int types; // they are 32bit wide on a 32-bit platform, and 64bit wide on a 64bit platform.
src/share/vm/utilities/globalDefinitions.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File