Steve Pool (IBM) , Götz Lindenmaier & Volker Simonis (SAP)
jtreg regression tests and benchmarks)
The SAP JVM supports Java 1.4, 5, 6, 7 and runs on 15 platforms:
..and we provide support for any SAP JVM version until the end of days:)
The SAP JVM is derived from the Sun/Oracle code base:
We constantly integrate Oracle changes:
Announced at JavaOne 2006
SAP can't use OpenJDK directly:
It took 5 years until SAP "officially" joined the OpenJDK project:
Today, the OpenJDK is a playground and collaboration space for different implementers:
The OpenJDK consists of two major building blocks
hotspot/src/cpu hotspot/src/cpu/ppc hotspot/src/os/aix hotspot/src/os_cpu/aix_ppc
hotspot/src/os hotspot/src/cpu/sparc hotspot/src/os/bsd hotspot/src/os_cpu/bsd_x86
hotspot/src/os_cpu hotspot/src/cpu/x86 hotspot/src/os/linux hotspot/src/os_cpu/bsd_zero
hotspot/src/share hotspot/src/cpu/zero hotspot/src/os/posix hotspot/src/os_cpu/linux_ppc
hotspot/src/os/solaris hotspot/src/os_cpu/linux_sparc
hotspot/src/os/windows hotspot/src/os_cpu/linux_x86
hotspot/src/os_cpu/linux_zero
hotspot/src/os_cpu/solaris_sparc
hotspot/src/os_cpu/solaris_x86
hotspot/src/os_cpu/windows_x86
jdk/src/solaris jdk/src/windows
The HotSpot VM first appeared in 2000 with Java 1.3 and is constantly evolving since then:
hotspot/src/share (~1100 files, ~100.000 loc) hotspot/src/os/linux ( ~25 files, ~9.000 loc) hotspot/src/os_cpu/linux_x86 ( ~20 files, ~3.500 loc) hotspot/src/cpu/x86 ( ~100 files, ~90.000 loc)
hotspot/src/os_cpu/linux_ppc ( ~10 files, ~1.500 loc) hotspot/src/cpu/ppc ( ~60 files, ~22.000 loc)
hotspot/src/os_cpu/linux_ppc (+ ~6 files,+ ~400 loc) hotspot/src/cpu/ppc (+ ~20 files,+ ~25.000 loc)AIX port:
hotspot/src/os/aix ( ~30 files,+ ~14.000 loc) hotspot/src/os_cpu/aix_ppc ( ~15 files,+ ~2000 loc)
+------------------+ | | C++ interpreter loop +------------------+ |xxxxxxxxxxxxxxxxxx| java frame n +------------------+ : .... : +------------------+ |xxxxxxxxxxxxxxxxxx| java frame 0 +------------------+ |//////////////////| vm |//////////////////|
One big challange when porting the C++Interpreter is that you first have implement
a Macro Assembler for your architecture!
The C2 "Server" JIT Compiler is the biggest (and most complicated) part of the HotSpot VM.
It consists of three main parts:
hotspot/src/share/vm/opto ( ~110 files, ~128.000 loc) hotspot/src/share/vm/adlc ( ~23 files, ~26.000 loc) hotspot/src/cpu/x86/vm/x86_32.ad ( ~14.000 loc) hotspot/src/cpu/x86/vm/x86_64.ad ( ~13.000 loc) hotspot/src/cpu/sparc/vm/sparc.ad ( ~10.000 loc) hotspot/src/cpu/ia64/vm/ia64.ad ( ~26.000 loc) hotspot/src/cpu/ppc/vm/ppc_64.ad ( ~14.000 loc)
For every new architecture the corresponding AD file has to be written which means:
Basic changes:
Adaptions and fixes of existing features in the C2 compiler
instruct loadConP(iRegPdst dst, immP src) %{
match(Set dst src);
ins_cannot_rematerialize(true);
format %{ "LD $dst, offset, $constanttablebase \t// load ptr $src from table, late expanded " %}
lateExpand( lateExpand_load_ptr_constant(dst, src, constanttablebase) );
%}
ins_attrib ins_field_cbuf_insts_offset(-1);
instruct exLoadConL(iRegLdst dst, immL src, iRegLdst toc, immI isoop) %{
effect(DEF dst, USE src, USE toc, USE isoop);
// Needed so that CallDynamicJavaDirect can compute the address of this
// instruction for relocation.
ins_field_cbuf_insts_offset(int);
format %{ "LD $dst, offset, $toc \t// load long(isoop=$isoop) $src from TOC" %}
ins_encode( ppc_enc_load_long_constL(dst, src, toc, isoop) );
%}
Extended and new features: Cpp-Interpreter
To use the Cpp-Interpreter in a fully fletched VM we implemented support for:
Extended and new features: C2 compiler
RegN
________|__________
RegN | |
| | Decode_NN_shift |
________|__________ |___________________|
| | |
| Decode_NN | lateExpand | this value is not RegN nor RegP
|___________________| ==============> ________|__________
| | |
| | Decode_NN_add |
RegP |___________________|
|
RegP
Extended and new features: runtime