jdk9 features (summary, 31/jul/2015) #jjug

Post on 19-Aug-2015

1.694 Views

Category:

Technology

6 Downloads

Preview:

Click to see full reader

TRANSCRIPT

JDK9KUBOTA Yuji (@sugarlife)

Java Japan User Group LT with b33r

10/Aug/2015

Attention•Depends on OpenJDK project.

•This slide provides only the summary for LT. Something may have been changed until General Availability is released.

•Drunken Speaker, Drunken LT. Please, don’t be serious :p

http://openjdk.java.net/projects/jdk9/ (31/Jul/2015)

Who am I

•KUBOTA Yuji (@sugarlife)•icedtea committer (HeapStats)

•OpenJDK Contributor

•JavaOne Speaker

•Hard-hearing person

JDK9 Schedule

•2015/12/10: Feature Complete

• : Many tests

•2016/07/21: Final Release Candidate

•2016/09/22: General Availability

http://openjdk.java.net/projects/jdk9/

What features will come?102: Process API Updates110: HTTP 2 Client143: Improve Contended Locking158: Unified JVM Logging165: Compiler Control193: Variable Handles197: Segmented Code Cache199: Smart Java Compilation, Phase Two201: Modular Source Code211: Elide Deprecation Warnings on Import Statements212: Resolve Lint and Doclint Warnings213: Milling Project Coin214: Remove GC Combinations Deprecated in JDK 8215: Tiered Attribution for javac216: Process Import Statements Correctly217: Annotations Pipeline 2.0219: Datagram Transport Layer Security (DTLS)220: Modular Run-Time Images221: Simplified Doclet API222: jshell: The Java Shell (Read-Eval-Print Loop)223: New Version-String Scheme224: HTML5 Javadoc226: UTF-8 Property Files227: Unicode 7.0228: Add More Diagnostic Commands229: Create PKCS12 Keystores by Default230: Microbenchmark Suite231: Remove Launch-Time JRE Version Selection232: Improve Secure Application Performance233: Generate Run-Time Compiler Tests Automatically235: Test Class-File Attributes Generated by javac236: Parser API for Nashorn237: Linux/AArch64 Port240: Remove the JVM TI hprof Agent241: Remove the jhat Tool243: Java-Level JVM Compiler Interface244: TLS Application-Layer Protocol Negotiation Extension245: Validate JVM Command-Line Flag Arguments246: Leverage CPU Instructions for GHASH and RSA247: Compile for Older Platform Versions248: Make G1 the Default Garbage Collector249: OCSP Stapling for TLS250: Store Interned Strings in CDS Archives251: Multi-Resolution Images252: Use CLDR Locale Data by Default253: Prepare JavaFX UI Controls & CSS APIs for Modularization254: Compact Strings255: Merge Selected Xerces 2.11.0 Updates into JAXP256: BeanInfo Annotations257: Update JavaFX/Media to Newer Version of GStreamer258: HarfBuzz Font-Layout Engine

What features will come?102: Process API Updates110: HTTP 2 Client143: Improve Contended Locking158: Unified JVM Logging165: Compiler Control193: Variable Handles197: Segmented Code Cache199: Smart Java Compilation, Phase Two201: Modular Source Code211: Elide Deprecation Warnings on Import Statements212: Resolve Lint and Doclint Warnings213: Milling Project Coin214: Remove GC Combinations Deprecated in JDK 8215: Tiered Attribution for javac216: Process Import Statements Correctly217: Annotations Pipeline 2.0219: Datagram Transport Layer Security (DTLS)220: Modular Run-Time Images221: Simplified Doclet API222: jshell: The Java Shell (Read-Eval-Print Loop)223: New Version-String Scheme224: HTML5 Javadoc226: UTF-8 Property Files227: Unicode 7.0228: Add More Diagnostic Commands229: Create PKCS12 Keystores by Default230: Microbenchmark Suite231: Remove Launch-Time JRE Version Selection232: Improve Secure Application Performance233: Generate Run-Time Compiler Tests Automatically235: Test Class-File Attributes Generated by javac236: Parser API for Nashorn237: Linux/AArch64 Port240: Remove the JVM TI hprof Agent241: Remove the jhat Tool243: Java-Level JVM Compiler Interface244: TLS Application-Layer Protocol Negotiation Extension245: Validate JVM Command-Line Flag Arguments246: Leverage CPU Instructions for GHASH and RSA247: Compile for Older Platform Versions248: Make G1 the Default Garbage Collector249: OCSP Stapling for TLS250: Store Interned Strings in CDS Archives251: Multi-Resolution Images252: Use CLDR Locale Data by Default253: Prepare JavaFX UI Controls & CSS APIs for Modularization254: Compact Strings255: Merge Selected Xerces 2.11.0 Updates into JAXP256: BeanInfo Annotations257: Update JavaFX/Media to Newer Version of GStreamer258: HarfBuzz Font-Layout Engine

( ゚д゚ )

Give it a once-over!

•This color’s feature is important for ME who develop the product depends on JVM.

•This color’s feature is interesting for someone who develop java applications.

•Good feature. But not affects on me.

102: Process API Updates

•Do you want information about process? ok, here is.

110: HTTP 2 Client

•Do you want API for HTTP/2 ? ok, here is.

143: Improve Contended Locking

•Good speed for contended java object monitors.

•JVM will get a better performance without change of your codes.

•But, HeapStats (includes thread monitor) developers may be required hard work.

158: Unified JVM Logging

•Shall we unify the log format of JVM: e.g. compiler, gc, classload, metaspace, etc...• If you develop log parser, watch it.

•Xlog[:[<what>][:[<output>][:[<decorators>][:<output-options>]]]]

•Xlog:gc=debug:file=gc.log:uptimemillis,pids:filecount=5,filesize=1024

165: Compiler Control

• I WANNA CONTROL COMPILER MORE DETAIL!

•You (probably JVM tester) can•add some order when specified

method is being compiled (for c1 and c2).• print assembly, set breakpoint,

enable compile or not, and more.

•change the option sets while run

193: Variable Handles

•sun.misc.Unsafe may be removed.

•So we prepare the alternatives. This JEP is the first step for it.

(おまけ) sun.misc.Unsafe 動向• 6/15-16 に行われた JCP Executive Committee Meeting で隠蔽・削除

に向けた影響や代替方法などの話し合いが行われた• 元々 sun.* 等は Jigsaw(module化) 関係で処遇を決める必要があった

• JCP Meeting の議題はここ、Unsafeに関する議事録はここ。

• この代替方法の最初のステップとして先の VarHandles が提案され、つい最近(7月)に JDK9 に盛り込まれることが決まった• VarHandles Project 詳細 (JVM Language Summit 2014)

http://www.oracle.com/technetwork/java/jvmls2014sandoz-2265216.pdf

• 今のところは• sun.misc.Unsafe などが deprecated / removed される時期は未明

• sun.misc.Unsafe を含む重要な内部 API はJDK9 では隠蔽のみ、JDK10 では削除したいという方向に議論が進んでいる (ソース:ML, JEP260)

• 代替方法も提案されているが実際に実装が揃うのはこれから

• という状況なので、JDK9 で使う方法を含めた具体的な実装はまだこれからですが、準備は意識した方が良いです。Feature Complete で確認しましょう :) なお、黒魔術なので仕組みを理解してから使いましょう

197: Segmented Code Cache

•Code cache diet.

•JVM will get a better performance without change of your codes.

199: Smart Java Compilation, Phase Two

•sjavac.

201: Modular Source Code

•JDK source code into modules.•A part of Project Jigsaw.

•If you read OpenJDK source code, you need to remake your nautical table :p

211: Elide Deprecation Warnings on Import Statements

•Lint warnings is cry-wolf?

•javac always show warning when you import statement which include a deprecated method or member.

•So resolve it.

212: Resolve Lint and DoclintWarnings

•To clean lint and doclinterrors of some JDK components.

213: Milling Project Coin

•Add language changes.•@SafeVargs on private methods

• non-overridable executable.

• improve try-with-resource• allow effectively final variables to

be used as resources.

•Allow diamond with anonymous classes if the argument type of the inferred type is denotable.•and more two coins.

214: Remove GC Combinations Deprecated in JDK 8

•Good bye following GC Combi.•DefNew + CMS•ParNew + SerialOld•DefNew + iCMS•ParNew + iCMS•CMS foreground(s)

• UseCMSCompactAtFullCollection• CMSFullGCsBeforeCompaction• UseCMSCollectionPassing

215: Tiered Attribution for javac

•New type checking in javac.

•If you have interest in “type” in compiler, you should read this implementation.

216: Process Import Statements Correctly

•Fix javac.

217: Annotations Pipeline 2.0

•javac again.

219: Datagram Transport Layer Security (DTLS)

•API for DTLS 1.0 (RFC 4347) and DTLS 1.2 (RFC 6347)

220: Modular Run-Time Images

•Restructure the JDK and JRE to accommodate modules. •A main part of Project Jigsaw

•Many risks and impacts•no longer contain the files

• lib/rt.jar, lib/tools.jar, lib/dt.jar,..

•Class loader of some existing packages will change, and more.

•But very useful for many Dev.

221: Simplified Doclet API

•Replace Docklet API(com.sun.javadoc) .

222: jshell: The Java Shell (Read-Eval-Print Loop)

•No need more Test.java!•An interactive tool for Java programming language.

•You can use it already at below.•https://jdk9.java.net/download/

•@bitter_fox joined this project.• (Japanese committer)

223: New Version-String Scheme

•Change version-string format.•Security update 2 times +

Minor update 1 times•Current

• long: 1.8.0_20-b62• short:8u20

•Proposed• long: 9.1.2+62• short:9.1.2• $MAJOR.$MINOR.$SECURITY

224: HTML5 Javadoc

http://www.w3.org/html/logo/

226: UTF-8 Property Files

•You will be enable to use UTF-8 property files.

227: Unicode 7.0

•You will..( see title.

228: Add More Diagnostic Commands

•Add below commands•print_class_summary (loaded classes)•print_codegenlist (method queued)•print_vm_state•print_uft8pool•datadump_request (heapdump?)•dump_codelist (n-methods)•print_codeblocks (code cache)•set_vmflag

229: Create PKCS12 Keystoresby Default

•Improve security.

230: Microbenchmark Suite

•JMH++•Add a basic suite of

microbenchmark to JDK codes.

231: Remove Launch-Time JRE Version Selection

•Remove forgotten options.•“-version:” option•Not “-version” option

•“JRE-Version” manifest entry at jar file.

232: Improve Secure Application Performance

•Good speed with a security manager installed.

233: Generate Run-Time Compiler Tests Automatically

•Generate jtreg-compatible automatically for openjdkdevelopers.

•If you want to evaluate JVM with new CPU instructions, optimizations, and other enhancements, generated tests should be useful.

235: Test Class-File Attributes Generated by javac

•yes, javac.

236: Parser API for Nashorn

•To get IDE support for Nashorn.

237: Linux/AArch64 Port

•ARM®

240: Remove the JVM TI hprofAgent

•Good bye hprof

•See also (alternatives)•OProfile•perf•YourKit•SystemTap (for debug)

241: Remove the jhat Tool

•Good bye jhat

•See also (alternatives)•Eclipse MAT

243: Java-Level JVM Compiler Interface

•You can trace JVM JIT activity via this interface.

244: TLS Application-Layer Protocol Negotiation Extension

•javax.net.ssl package supports the TLS ALPN.

•This feature relates to HTTP/2 support (JEP110).

245: Validate JVM Command-Line Flag Arguments

•For example, some JVM flag takes an out-of-range value, and crashes without an informative error message.

•So fix it.

246: Leverage CPU Instructions for GHASH and RSA

•Good security with a low overhead.

246: Leverage CPU Instructions for GHASH and RSA

•Good security with a low overhead.• for SPARC and Intel x64 CPU.

247: Compile for Older Platform Versions

•javac for older.

248: Make G1 the Default Garbage Collector

•Oracle says “G1 is good”.

•Huge impact to a operation by default JVM options.

•But I think that all listeners set a configuration to use specified GC. So this change does not impact you.

•Really?

249: OCSP Stapling for TLS

•TLS. Support RFC 6961.

250: Store Interned Strings in CDS Archives

•Interned String will be stored in Class-Data Sharing when G1GC used.

•A history of a housing•Permanent Gen (JDK6)•Java Heap (JDK7-8)•Class-Data Sharing (JDK9+G1)

251: Multi-Resolution Images

•A new java.awt.image API for multi-resolution image.

y

y/2x/2

x

252: Use CLDR Locale Data by Default

•Use locale data from the Unicode Common Locale Data Repository.

253: Prepare JavaFX UI Controls & CSS APIs for Modularization

•To clean around JavaFX to prepare for Project Jigsaw.

254: Compact Strings

•String class diet.

255: Merge Selected Xerces2.11.0 Updates into JAXP

•To update JAXP from Xerces2.7.1 to 2.11.0.

256: BeanInfo Annotations

•Replace @beaninfo .•@interface JavaBean {…}•@interface BeanProperty {…}•@interface SwingContainer{…}

257: Update JavaFX/Media to Newer Version of GStreamer

•Update GStreamer.•GStreamer: multimedia framework.

258: HarfBuzz Font-Layout Engine

•Replace OpenType font-layout engine from ICU to HarfBuzz.

Important features for me.

•sun.misc.Unsafe alternatives.

•G1GC by default.

•Project Jigsaw.

•JIT compiler is more friendly.

•jshell

top related