javajvmjprofilermemory-profiling

Does allocation profiling in JProfiler show the actual size?


I'm using JProfiler to analyze memory allocation in my Java application. When I perform a specific operation, I see a 200MB spike in the live memory view. However, the allocation profiling only shows a 6MB increase.

Why is there such a large discrepancy between the live memory view and the allocation profiling results? How does JProfiler calculate the allocated memory size in the allocation profiling view?"


Solution

  • The "recorded objects" view shows all objects on the heap. The "allocation call tree" and the "allocation hot spots" views use allocation sampling because allocation recording is an expensive operation.

    By default, the sampling rate is set to 10%.