harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@computer.org
Subject Re: [arch] Interpreter vs. JIT for Harmony VM
Date Mon, 14 Nov 2005 19:55:34 GMT
From: Steve Shih-wei Liao <liao24@gmail.com>

> - Re-entrant JIT: Many JITs are not re-entrant. When running, for instance,
> MTRT in SPECJVM, because multiple threads are running, multiple JITTing may
> happen concurrently if there is no locking. The Execution Manager can put
> locks before each JITTing in order to ensure that no multiple JITTing is
> going on concurrently.

Do you know an actual JIT compiling the same method simultaneously?

HotSpot VM has a thread dedicated to JIT compilation and the compiling
thread receive a compilation request from a queue.

A JIT I have developed took another way in which a thread executing an
application compiles the application. The JIT allows multiple threads
to do JIT compilation simultaneously but a method is not compiled
multiple times because of appropriate locks assined to each stage
of JIT compilation.

There are choices on the relationship between threads and JIT

- Separated threads dedicated to JIT compilation.
  - Number of locks by JIT gets fewer?
  - Compilation takes much time in case that there are many active
    application threads. It leads to further starvation.
    Note that HotSpot VM has -Xbatch option to lighten this problem.
  - Exploits more processors remaining?

- Application threads which also perform JIT compilation.
  - Exploits multiple processors for JIT compilation naturally.

  Kazuyuki Shudo	shudo@computer.org	http://www.shudo.net/

View raw message