diff src/share/vm/gc_implementation/g1/heapRegion.hpp @ 3980:8229bd737950

7075646: G1: fix inconsistencies in the monitoring data Summary: Fixed a few inconsistencies in the monitoring data, in particular when reported from jstat. Reviewed-by: jmasa, brutisso, johnc
author tonyp
date Fri, 23 Sep 2011 16:07:49 -0400
parents 4dfb2df418f2
children 65a8ff39a6da
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.hpp	Thu Sep 22 10:57:37 2011 -0700
+++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp	Fri Sep 23 16:07:49 2011 -0400
@@ -357,6 +357,11 @@
   static int GrainWords;
   static int CardsPerRegion;
 
+  static size_t align_up_to_region_byte_size(size_t sz) {
+    return (sz + (size_t) GrainBytes - 1) &
+                                      ~((1 << (size_t) LogOfHRGrainBytes) - 1);
+  }
+
   // It sets up the heap region size (GrainBytes / GrainWords), as
   // well as other related fields that are based on the heap region
   // size (LogOfHRGrainBytes / LogOfHRGrainWords /