[kaffe] bytecodes

Eduardo Melione Abreu melione at cos.ufrj.br
Fri May 21 14:14:02 PDT 2004


Hi,

I'm working on trace's output with MOREJIT option and I would like to 
print some values of stack and local variables array. Is there some 
function that returns this? In practice, I would like to see the value 
used from array when the instruction aload 0 is executed.

Thanks,
Eduardo Melione 

On Wed, 7 Jan 2004, Dalibor Topic wrote:

> Hi Eduardo,
> 
> Eduardo Melione Abreu wrote:
> > Thank you!
> > 
> > I want to know the values of the most simple bytecodes, whose operate 
> > on local integer variables, stack and constants (all about 65 
> > bytecodes). However, I have interes to do this patch. What I have do do? 
> > How and where do I start? I'm very interested about...
> 
> Actually, there is also the vmdebug option MORE_JIT, that gives you some 
>   slightly better output:
> 
> @0:     aload 0
> @1:     iload 1
> @2:     iconst 0
> @3:     invokevirtual 173
> 
> vs
> 
> 000: ALOAD_0
> 000: ALOAD_1
> 000: ALOAD_2
> 000: ALOAD_3
> 001: GETFIELD
> 004: IFNE
> 007: ILOAD_1
> 007: ILOAD_2
> 007: ILOAD_3
> 008: ALOAD_0
> 008: ALOAD_1
> 008: ALOAD_2
> 008: ALOAD_3
> 009: GETFIELD
> 012: ARRAYLENGTH
> 
> with INT_INSTR.
> 
> It would be great if you could take the MORE_JIT output, and extend it 
> to resolve the constants, for example, and print its arguments.
> 
> the function is called trace_jcode in kaffe/kaffevm/kaffe.def. Take a 
> look at the bytecodes that interest you, and add better humanely 
> readable output to their trace_jcode calls. Don't hesitate to ask 
> questions. ;)
> 
> cheers,
> dalibor topic
> 





More information about the kaffe mailing list