1.1 --- a/src/share/vm/gc_implementation/g1/g1MonitoringSupport.cpp Wed Apr 11 16:18:45 2012 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1MonitoringSupport.cpp Wed Apr 18 07:21:15 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -177,19 +177,19 @@ 1.11 // values we read here are possible (i.e., at a STW phase at the end 1.12 // of a GC). 1.13 1.14 - size_t young_list_length = g1->young_list()->length(); 1.15 - size_t survivor_list_length = g1->g1_policy()->recorded_survivor_regions(); 1.16 + uint young_list_length = g1->young_list()->length(); 1.17 + uint survivor_list_length = g1->g1_policy()->recorded_survivor_regions(); 1.18 assert(young_list_length >= survivor_list_length, "invariant"); 1.19 - size_t eden_list_length = young_list_length - survivor_list_length; 1.20 + uint eden_list_length = young_list_length - survivor_list_length; 1.21 // Max length includes any potential extensions to the young gen 1.22 // we'll do when the GC locker is active. 1.23 - size_t young_list_max_length = g1->g1_policy()->young_list_max_length(); 1.24 + uint young_list_max_length = g1->g1_policy()->young_list_max_length(); 1.25 assert(young_list_max_length >= survivor_list_length, "invariant"); 1.26 - size_t eden_list_max_length = young_list_max_length - survivor_list_length; 1.27 + uint eden_list_max_length = young_list_max_length - survivor_list_length; 1.28 1.29 _overall_used = g1->used_unlocked(); 1.30 - _eden_used = eden_list_length * HeapRegion::GrainBytes; 1.31 - _survivor_used = survivor_list_length * HeapRegion::GrainBytes; 1.32 + _eden_used = (size_t) eden_list_length * HeapRegion::GrainBytes; 1.33 + _survivor_used = (size_t) survivor_list_length * HeapRegion::GrainBytes; 1.34 _young_region_num = young_list_length; 1.35 _old_used = subtract_up_to_zero(_overall_used, _eden_used + _survivor_used); 1.36 1.37 @@ -207,7 +207,7 @@ 1.38 committed -= _survivor_committed + _old_committed; 1.39 1.40 // Next, calculate and remove the committed size for the eden. 1.41 - _eden_committed = eden_list_max_length * HeapRegion::GrainBytes; 1.42 + _eden_committed = (size_t) eden_list_max_length * HeapRegion::GrainBytes; 1.43 // Somewhat defensive: be robust in case there are inaccuracies in 1.44 // the calculations 1.45 _eden_committed = MIN2(_eden_committed, committed); 1.46 @@ -237,10 +237,10 @@ 1.47 // When a new eden region is allocated, only the eden_used size is 1.48 // affected (since we have recalculated everything else at the last GC). 1.49 1.50 - size_t young_region_num = g1h()->young_list()->length(); 1.51 + uint young_region_num = g1h()->young_list()->length(); 1.52 if (young_region_num > _young_region_num) { 1.53 - size_t diff = young_region_num - _young_region_num; 1.54 - _eden_used += diff * HeapRegion::GrainBytes; 1.55 + uint diff = young_region_num - _young_region_num; 1.56 + _eden_used += (size_t) diff * HeapRegion::GrainBytes; 1.57 // Somewhat defensive: cap the eden used size to make sure it 1.58 // never exceeds the committed size. 1.59 _eden_used = MIN2(_eden_used, _eden_committed);