< prev index next >

src/share/vm/gc_implementation/shared/gcUtil.hpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.
Summary: Relevant fixes in blockOffsetTable.cpp, os_linux.cpp, parCardTableModRefBS.cpp.

*** 1,7 **** /* ! * Copyright (c) 2002, 2013, 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) 2002, 2015, 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.
*** 101,111 **** // Update data with a new sample. void sample(float new_sample); static inline float exp_avg(float avg, float sample, unsigned int weight) { ! assert(0 <= weight && weight <= 100, "weight must be a percent"); return (100.0F - weight) * avg / 100.0F + weight * sample / 100.0F; } static inline size_t exp_avg(size_t avg, size_t sample, unsigned int weight) { // Convert to float and back to avoid integer overflow. --- 101,111 ---- // Update data with a new sample. void sample(float new_sample); static inline float exp_avg(float avg, float sample, unsigned int weight) { ! assert(weight <= 100, "weight must be a percent"); return (100.0F - weight) * avg / 100.0F + weight * sample / 100.0F; } static inline size_t exp_avg(size_t avg, size_t sample, unsigned int weight) { // Convert to float and back to avoid integer overflow.
< prev index next >