Results 1 to 1 of 1
Thread: BCEL instruction
- 02-01-2012, 08:49 PM #1Member
- Join Date
- Feb 2012
- Rep Power
I am trying to write a timing strategy for Volta, an execution time analyzer for Java processors. In Volta, the execution time of a Java Bytecode instruction is determined with the following method:
public int getCycles(Instruction instruction)
This method looks up the instruction time of the Instruction. The class Instruction of BCEL is used: Instruction (Commons BCEL 6.0-SNAPSHOT API)
For example, getCycles(BIPUSH) returns "2", meaning it takes 2 cycles on a java processor to execute a bipush bytecode.
Okay, now the problem. On a particular Java processor, the execution time of the instruction varies with the argument. For example, using LDC to load an integer takes 7 cycles. Using LDC to load a string takes 3 cycles.
Therefore, I need to know exactly what an Instruction does, just the opcode isn't enough. Does anybody know how to do this? I might be able to get the index used by the LDC instruction with
but how can I determine which constant is actually loaded?
- By axenos in forum Advanced JavaReplies: 0Last Post: 03-06-2011, 03:46 PM
- By rippon in forum AWT / SwingReplies: 4Last Post: 11-30-2010, 02:30 AM
- By diegoyj in forum New To JavaReplies: 1Last Post: 01-27-2010, 11:09 PM
- By ibmzz in forum JDBCReplies: 0Last Post: 01-19-2008, 10:04 AM
- By ZAXTHEGREAT in forum New To JavaReplies: 15Last Post: 07-23-2007, 04:27 PM