src/hotspot/share/code/codeHeapState.cpp
changeset 55294 3493c1bc59fd
parent 54973 0927d8c7296f
--- a/src/hotspot/share/code/codeHeapState.cpp	Fri Jun 07 10:26:21 2019 -0700
+++ b/src/hotspot/share/code/codeHeapState.cpp	Fri Jun 07 12:26:50 2019 -0700
@@ -530,7 +530,7 @@
   }
 }
 
-void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, const char* granularity_request) {
+void CodeHeapState::aggregate(outputStream* out, CodeHeap* heap, size_t granularity) {
   unsigned int nBlocks_free    = 0;
   unsigned int nBlocks_used    = 0;
   unsigned int nBlocks_zomb    = 0;
@@ -612,7 +612,8 @@
   //   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.
   //
-  size_t granularity = strtol(granularity_request, NULL, 0);
+  assert(granularity > 0, "granularity should be positive.");
+
   if (granularity > size) {
     granularity = size;
   }