< prev index next >

src/hotspot/share/code/codeHeapState.cpp

Print this page

        

@@ -528,11 +528,11 @@
     }
     nHeaps = 0;
   }
 }
 
-void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granularity) {
+void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, const char* granularity_request) {
   unsigned int nBlocks_free    = 0;
   unsigned int nBlocks_used    = 0;
   unsigned int nBlocks_zomb    = 0;
   unsigned int nBlocks_disconn = 0;
   unsigned int nBlocks_notentr = 0;

@@ -610,12 +610,11 @@
   //   keep the amount of allocated storage in check.
   //
   //   Finally, we adjust the granularity such that each granule covers at most 64k-1 segments.
   //   This is necessary to prevent an unsigned short overflow while accumulating space information.
   //
-  assert(granularity > 0, "granularity should be positive.");
-
+  size_t granularity = strtol(granularity_request, NULL, 0);
   if (granularity > size) {
     granularity = size;
   }
   if (size/granularity < min_granules) {
     granularity = size/min_granules;                                   // at least min_granules granules
< prev index next >