Calculating Methods' Local Variable Sizes at Runtime

Nemo Caviani <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Hello All,

I am a newbie to ASM and I would appreciate your help with the following
matter.

I have load-time instrumented my bytecode. I keep all sorts of information
for my classes and methods to measure CPU time, memory usage, etc. Now, what
I need to do is to calculate the actual amount of data that is passed from
one method to another through the input parameters and also its return value
of the method.

This is in particular important for me as it enables me to measure the
actual amount of data that arrays and link lists take when they are passed
as arguments to a method or when they are returned from methods.

I have checked the visitLocalVariable method, but I am not sure how I can
relate the name and the description of a local variable to its actual data
size in the local stack memory, especially when it is not a basic type like
INT or BOOLEAN.

I also looked into visitFrame which seems to have more details about the
variables of a method. However, overwriting visitFrame results in a
VerifyError as it seems like I need to calculate the stack size for the
method manually, which I don't know how.

I highly appreciate any help from you guys.

thanks a lot,
Nemo
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.