x86 interpreters in hotspot

Xin Tong xerox.time.tech at gmail.com
Mon May 7 19:36:05 PDT 2012


On Mon, May 7, 2012 at 10:23 PM, Krystal Mok <rednaxelafx at gmail.com> wrote:
> Hi Xin,
>
> These slides will help you get started with the template-based interpreter
> in HotSpot.
>
> 1. a must read introduction (in English):
> Sun Hotspot JVM Part 1: The Interpreter ... on the x86 platform
> http://markmail.org/download.xqy?id=vn5olfue3yiwldjh&number=1
>
> 2. some notes I wrote (in Chinese):
> http://www.tektalk.org/2011/07/28/java-%E7%A8%8B%E5%BA%8F%E7%9A%84%E7%BC%96%E8%AF%91%EF%BC%8C%E5%8A%A0%E8%BD%BD-%E5%92%8C-%E6%89%A7%E8%A1%8C/
>
> 3. another presentation (in Japanese):
> http://www.slideshare.net/ytoshima/hotspot-template-interpreter-memos
>
> More comments inline below:
>
> On Tue, May 8, 2012 at 8:43 AM, Xin Tong <xerox.time.tech at gmail.com> wrote:
>>
>> I am investigating how interpreter is written in hotspot. It seems
>> hotspot uses a template based interpreter in which how a bytecode
>> should be handled in defined in a template form and generated in
>> memory when the virtual machine is launch.  what is the function that
>> is called to build this bytecode interpreter in memory in hotspot x86
>> ?
>>
>> >From the online document, it says hotspot is not using the classic
>> switch dispatch interpreter, is it using the direct threaded
>> interpreter ?
>>
> The template interpreter in HotSpot VM is better described as a
> token-threaded dispatch interpreter, or indirect-threaded dispatch (as
> opposed to direct-threaded dispatch).
>
> - Kris
>
>>
>> Thanks
>>
>> Xin
>
>
Thank you. This is very helpful. I want to write something that can
keep track of all unique the virtual PC ( Java bytecode PC the
interpreter has executed ). should I do a call-out in every template ?
can I just generate call to a function of my own sourrounded by a
sequence of pushes and pops.

Thanks

Xin


More information about the hotspot-runtime-dev mailing list