< prev index next >

src/hotspot/share/code/codeHeapState.cpp

Print this page

        

*** 528,538 **** } nHeaps = 0; } } ! 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; unsigned int nBlocks_disconn = 0; unsigned int nBlocks_notentr = 0; --- 528,538 ---- } nHeaps = 0; } } ! 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,621 **** // 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."); ! if (granularity > size) { granularity = size; } if (size/granularity < min_granules) { granularity = size/min_granules; // at least min_granules granules --- 610,620 ---- // 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. // ! 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 >