Local variables map
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Dear all, I'm realizing a collection profiler for Java, based on ASM. In short this profiler would track, per each collection allocated in the Java application profiled, which methods are invoked and how many times. I have a problem. I cannot manage to construct, while profiling, the local variables table. I implemented my Class and MethodAdapter and I'm instrumenting the code using this adapters. By now I'm trying to track the ALOAD in the program but sometimes this procedure is wrong. For example the Java code arr2.addAll(arr1) produces the following ASMified code: > mv.visitVarInsn(ALOAD, 3); > mv.visitVarInsn(ALOAD, 1); > mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/ArrayList", "addAll", "(Ljava/util/Collection;)Z"); I'm assuming that, the object in which the method is invoked is the last one that has been ALOADed but, as the above example demonstrate, this is not the case since with my procedure I'm saying that the 'addAll' is invoked on variable # 1 and, in reality it is invoked on variable # 2 with variable # 1 as parameter. I tried to use also the Analyzer and the two Interpreters but without success. Looking forward to hearing from you guys. Best, RM
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