14
Group photograph at Linaro Connect in Copenhagen Monday 29 Oct 2012 Why? What? How? Who? Where? When? LCE-13 OpenJDK

LCE13: LEG - OpenJDK

  • Upload
    linaro

  • View
    157

  • Download
    0

Embed Size (px)

DESCRIPTION

Resource: LCE13 Name: LEG - OpenJDK Date: 10-07-2013 Speaker: Andy Johnson Video: https://www.youtube.com/watch?v=_mjNleD48Cc&feature=c4-overview&list=UUIVqQKxCyQLJS6xvSmfndLA

Citation preview

Page 1: LCE13: LEG - OpenJDK

Group photograph at Linaro Connect in CopenhagenMonday 29 Oct 2012

Why? What? How? Who? Where? When?

LCE-13OpenJDK

Page 2: LCE13: LEG - OpenJDK

www.linaro.org

Meet the team

• RedHato Andrew Haley (Template Interpreter & C1 Compiler)o Andrew Dinn (C2 Compiler)

• Linaroo Andrew Johnson (Test and Benchmarking)o Ed Nevill (General dogsbody)

• With thanks to

o Riku Voipio (help with OpenEmbedded)

o Andrew McDermott (help with CI loop integration)

• Managemento Andrea Gallo (LEG Director) o Ilias Biris (Project Manager)

Page 3: LCE13: LEG - OpenJDK

www.linaro.org

Why Java

• Java is the most popular programming language!– Or maybe 2nd most popular

– Depending who you talk to

• Java is used in servers – a lot

• Tends to be used in performance critical database apps.

• Tier 1 Java support is a requirement

Why Java

Page 4: LCE13: LEG - OpenJDK

www.linaro.org

Java terminology

• J2ME – Java 2 Micro Edition– Opensource implementation by phoneMe

• J2SE – Java 2 Standard Edition

– Opensource implementation by OpenJDK

• J2EE – Java 2 Enterprise Edition

– OpenJDK + Jboss

• OpenJDK

– Hotspot – The VM

– JDK – The Java runtime

– Other components (corba, jaxp, jaxws, nashorn)

Page 5: LCE13: LEG - OpenJDK

www.linaro.org

Inside Hotspot

• Zero– C++ bytecode interpreter – veerrrryy sloooowww

– Useful as a reference implementation only

• Template Interpreter

– Chunk of assembler (template) for each bytecode

– Templates copied and modified depending on entry conditions (atos, itos, vtos, dtos)

– Computed goto at end of each loop removes loop overhead.

– Performance improvement 3-5x over Zero

Page 6: LCE13: LEG - OpenJDK

www.linaro.org

Inside Hotspot

• C1 (Client) Compiler– Simple register allocator

– Simple straight line compilation

– Simple optimisation across bytecodes

– Assumed 32 bit!

– Performance ~10 x Template interpreter

• C2 (Server) Compiler

– Aggressive global optimisation

– Predictive optimisation / deoptimisation

– Performance ~2 X C1

Page 7: LCE13: LEG - OpenJDK

www.linaro.org

Inside Hotspot

• Tiered compilation– Start executing in Template interpreter

– Compile with C1 if method is hot

– Compile with C2 if method is still hot

– Tiered compilation good for dynamically changing loads

– If load is static, may as well just use C2

– But C2 will give very slow startup,

Page 8: LCE13: LEG - OpenJDK

www.linaro.org

Current Status

• AARCH64 initial released pushed Monday– Announcement on aarch64 mailing list

• Template Interpreter

– Code complete

– Fails 2 more Mauve tests compared to Zero

– “Pretty Rock Solid”

• C1 Compiler

– Compiling 100s of methods

– Not quite code complete – nearly

• C2 Compiler

– Work in progress

Page 9: LCE13: LEG - OpenJDK

www.linaro.org

Next Steps

• Template Interpreter– Continue testing with JTReg & fix faults

– Integrate build into OE & develop CI loop

• C1 Compiler

– Fix existing faults to get to code complete

– Once code complete move to testing

– Not yet stable enough to test

• C2 Compiler

– Under development adinn @ redhat

Page 10: LCE13: LEG - OpenJDK

www.linaro.org

Resources

• Source mercurial– http://hg.openjdk.java.net/aarch64-port/jdk8

• Mailing list

[email protected]

• IRC

– Server: irc.oftc.net Channel: #openjdk

Page 11: LCE13: LEG - OpenJDK

Group photograph at Linaro Connect in CopenhagenMonday 29 Oct 2012

Test and Benchmark Status

LCE-13OpenJDK

Page 12: LCE13: LEG - OpenJDK

www.linaro.org

Available Validation Tests

● Mauve○ Developed for "clean room" implementations of Java○ Maintained through Java 6○ Uses a Java test harness

■ Tests can be run on the same Java that runs the harness or a designated JVM

■ Over 5000 tests, covering both java and javax packages○ Tests run on several ports

■ OpenJDK 7 Zero port■ OpenJDK 8 Zero port■ OpenJDK 8 Template interpreter■ OpenJDK 8 Client compiler (C1)

● JTREG○ Unit tests supplied with OpenJDK○ Current with OpenJDK○ Over 3000 tests in combined "core" and "default" suites○ Same harness used to run JCK when available

Page 13: LCE13: LEG - OpenJDK

www.linaro.org

Test ResultsOpenJDK 7 x86-64 aarch64 Zero

Mauve Fail Total Tests Fail Total Tests

Totals 773 5267 800 5261

OpenJDK8 x86-64 Zero

aarch64Zero

aarch64 Template

aarch64Client

Mauve Fail Total Fail Total Fail Total Fail Total

Totals 554 5119 752 5114 570 5112 581 5112

OpenJDK 8 x86-64 Zero

aarch64 Zero

aarch64 Template

JTREG Pass Fail Pass Fail Pass Fail

Totals 2957 78 2638 381 2638 381

Page 14: LCE13: LEG - OpenJDK

www.linaro.org

Benchmarks

● Embedded Caffeinemark○ Developed for Java ME○ Small enough to run on emulator

● SPECjvm2008○ Freely available○ Single subset run on emulator as proof of concept○ More complete runs when hardware available

● SPECjbb2013○ Newly released ○ Designed specifically for Java server performance○ Available under license - will obtain when all components are

ready