tracing object creation with JVMPI

C

coltrane

I am trying to collect data on object creation and where in the code
this is occuring.
I know with jvmpi I can get the objectid on an object_alloc event but
that only gives me an address and not the class name. If I could get
the class name is it possible to find out where the object was created.
thanks


john
 
S

Stephen Kellett

I know with jvmpi I can get the objectid on an object_alloc event but
that only gives me an address and not the class name. If I could get
the class name is it possible to find out where the object was created.
thanks

You need to track more than the object creation event. Read the jvmpi.h
and the documentation. There is a class load event that has a class id.
The object allocation event also specifies the class id.

Match the two ids - you know which class you are using.

Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top