By writing profiling, I would also perform the typical task of profiling a heap. In particular, I would like to track which thread allocated how much data? Using JVMTI, I thought it’s enough to connect to the VM Object Allocation and Object Free events. Unfortunately, I read that the first event does not fire due to calls made to new.
The last idea that I had was to check the MethodExit event if its name <init>and thus declare this call as an object distribution. However, in this event, I cannot receive the object, and therefore I cannot call GetObjectSize.
A simple repetition over a heap does not contain information about which object was selected by the stream. Does anyone have an idea how to implement this?
source
share