Trace object allocation flag proposal
Alan.Bateman at oracle.com
Wed Dec 15 11:53:53 PST 2010
Xiaobin Lu wrote:
> One of the problems JVMTI has is that once it is enabled, it will fire
> all kinds of events which will cause even more overheads. Correct me
> if I am wrong here.
The JVMTI functions and events are partitioned into capabilities and an
agent enables the capabilities and events that it requires. That said,
you won't actually find support for object allocation events in the
spec. Rather it's as Ramki said, JVMTI provides functions to allow
agents to do load-time or dynamic instrumentation. As the agent is
inserting java bytecodes then it means the VM can run at "full-speed"
but it depends on course on what the agent inserts and whether it
instruments all allocation sites or is selective. Instrumentation can be
used to observe most object allocation but there are a couple of places
that aren't easy to instrument such as reflection. For those cases there
is a VMObjectAlloc event that needs to be enabled.
More information about the hotspot-runtime-dev