changes to Hotspot to support multiple targets
Venkatachalam, Vasanth
Vasanth.Venkatachalam at amd.com
Fri Jan 4 14:24:50 PST 2013
Hi Ivan,
Thanks for the reply.
As a quick prototype, we are trying to modify the C2 compiler to generate the instructions of the new ISA, while C1 and the interpreter still generate x86. We were planning to do this by creating a new directory src/cpu/<new target> where we would move all the C2 arch-specific files (which we will modify to emit code for the new target), while keeping the rest of the files in the x86/ directory intact, which will be used by the interpreter and C1.
We have two questions:
1) What changes are needed to the build process so that we can build Hotspot?
2) What changes are needed to ensure that the C2 compiler looks in the new target directory for the arch specific files, instead of looking in the old x86/ directory?
Vasanth
-----Original Message-----
From: sumatra-dev-bounces at openjdk.java.net [mailto:sumatra-dev-bounces at openjdk.java.net] On Behalf Of Ivan Krylov
Sent: Sunday, December 16, 2012 2:16 PM
To: sumatra-dev at openjdk.java.net
Subject: Re: changes to Hotspot to support multiple targets
This is indeed a non-typical target for the Hotspot. AFAIK, Hotspot does
not support heterogeneous targets of any kind. I'd suggest to implement
as a first step support for the interpreter-only that would force
compilation for the GPU-suitable code (whever is used to mark a given
method or branch "GPU-suitable"). While for x86 the transition from
interpreter to compiled code happens with OSR (on-stack replacement) in
case of sumatra it would be a call to the SC to start execution.
For some simple compute-intensive examples this could be a good proof of
concept because the host code gets called just once and will be
interpreted anyway and the compute-intensive code gets compilet for GPS
and executed for GPU.
At the later stage a new target would need be set up (call it HSA).
Thanks,
Ivan
On 12-Dec-12 20:51, Venkatachalam, Vasanth wrote:
> Hotspot supports generating code for a single ISA (e.g., x86) at a time. However, to have the flexibility of executing code on either the CPU or the GPU, the compilers and code generators for both targets would need to coexist and communicate with each other.
>
> Do people have ideas on how this change can be implemented in Hotspot?
>
> Vasanth
>
>
> --
> Vasanth Venkatachalam
> AMD Runtimes
> (512)602-6177
>
More information about the sumatra-dev
mailing list