How to trace the hotspot bytecode interpreter
Colin(Du Li)
dawn2004 at gmail.com
Thu Feb 19 08:24:45 PST 2009
Hi, Gary,
Thank you very much for your explanation!
I still have two questions.
1. If I wanna add a read barrier to bytecode interpreter, which will trap
all the object access in bytecode, where should I put this read barrier?
2. What is the bytecodeInterpreter.cpp used for? It seems to have a lot of
bytecode interpreter thing as follows:
CASE(_aload):
SET_STACK_OBJECT(LOCALS_OBJECT(pc[1]), 0);
UPDATE_PC_AND_TOS_AND_CONTINUE(2, 1);
Thanks again!
Colin
Gary Benson wrote:
>
> For x86 you need the template interpreter. The code that executes
> bytecodes exists as fragments of assembly language, generated by code
> in hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp or
> hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp.
>
> Cheers,
> Gary
>
> Colin(Du Li) wrote:
>> Hi Gary,
>>
>> I use x86. You mean bytecodeInterpreter is useless?
>> Then where is the bytecode interpreter codes in Hotspot?
>> e.g. where is the instruction, such as "getField", been interpreted
>> and executed?
>>
>> Thanks a lot!
>>
>> Colin
>>
>> Gary Benson wrote:
>> > Hi Colin,
>> >
>> > What platform are you using? If you are on x86, x86_64 or sparc (and
>> > you haven't messed with the build to enable the C++ interpreter) then
>> > nothing in bytecodeInterpreter.cpp is ever used.
>> >
>> > Cheers,
>> > Gary
>> >
>> > Colin(Du Li) wrote:
>> > > I know the byte interpreter implementation is mainly in
>> > > bytecodeInterpreter.cpp, but it doesn't allow me set break point in
>> > > this file. I wanna trace the bytecode interpreter. Where can I put
>> > > break pointer? Where is the entrance to bytecodeInterpreter.cpp,
>> > > that is, in Hotpot, which classes will call the methods in
>> > > bytecodeInterpreter.cpp?
>> > > Thanks.
>
> --
> http://gbenson.net/
>
>
--
View this message in context: http://www.nabble.com/How-to-trace-the-hotspot-bytecode-interpreter-tp22091780p22104126.html
Sent from the OpenJDK Hotspot Virtual Machine mailing list archive at Nabble.com.
More information about the hotspot-dev
mailing list