Mais conteúdo relacionado Semelhante a JDK9 新機能 (日本語&ショートバージョン) #jjug (20) JDK9 新機能 (日本語&ショートバージョン) #jjug3. Who am I
•KUBOTA Yuji (@sugarlife)
•icedtea committer
(HeapStats)
•JVM 芸人
•難聴者
4. What features will come?
102: Process API Updates
110: HTTP 2 Client
143: Improve Contended Locking
158: Unified JVM Logging
165: Compiler Control
193: Variable Handles
197: Segmented Code Cache
199: Smart Java Compilation, Phase Two
201: Modular Source Code
211: Elide Deprecation Warnings on Import Statements
212: Resolve Lint and Doclint Warnings
213: Milling Project Coin
214: Remove GC Combinations Deprecated in JDK 8
215: Tiered Attribution for javac
216: Process Import Statements Correctly
217: Annotations Pipeline 2.0
219: Datagram Transport Layer Security (DTLS)
220: Modular Run-Time Images
221: Simplified Doclet API
222: jshell: The Java Shell (Read-Eval-Print Loop)
223: New Version-String Scheme
224: HTML5 Javadoc
226: UTF-8 Property Files
227: Unicode 7.0
228: Add More Diagnostic Commands
229: Create PKCS12 Keystores by Default
230: Microbenchmark Suite
231: Remove Launch-Time JRE Version Selection
232: Improve Secure Application Performance
233: Generate Run-Time Compiler Tests Automatically
235: Test Class-File Attributes Generated by javac
236: Parser API for Nashorn
237: Linux/AArch64 Port
240: Remove the JVM TI hprof Agent
241: Remove the jhat Tool
243: Java-Level JVM Compiler Interface
244: TLS Application-Layer Protocol Negotiation Extension
245: Validate JVM Command-Line Flag Arguments
246: Leverage CPU Instructions for GHASH and RSA
247: Compile for Older Platform Versions
248: Make G1 the Default Garbage Collector
249: OCSP Stapling for TLS
250: Store Interned Strings in CDS Archives
251: Multi-Resolution Images
252: Use CLDR Locale Data by Default
253: Prepare JavaFX UI Controls & CSS APIs for Modularization
254: Compact Strings
255: Merge Selected Xerces 2.11.0 Updates into JAXP
256: BeanInfo Annotations
257: Update JavaFX/Media to Newer Version of GStreamer
258: HarfBuzz Font-Layout Engine
5. What features will come?
102: Process API Updates
110: HTTP 2 Client
143: Improve Contended Locking
158: Unified JVM Logging
165: Compiler Control
193: Variable Handles
197: Segmented Code Cache
199: Smart Java Compilation, Phase Two
201: Modular Source Code
211: Elide Deprecation Warnings on Import Statements
212: Resolve Lint and Doclint Warnings
213: Milling Project Coin
214: Remove GC Combinations Deprecated in JDK 8
215: Tiered Attribution for javac
216: Process Import Statements Correctly
217: Annotations Pipeline 2.0
219: Datagram Transport Layer Security (DTLS)
220: Modular Run-Time Images
221: Simplified Doclet API
222: jshell: The Java Shell (Read-Eval-Print Loop)
223: New Version-String Scheme
224: HTML5 Javadoc
226: UTF-8 Property Files
227: Unicode 7.0
228: Add More Diagnostic Commands
229: Create PKCS12 Keystores by Default
230: Microbenchmark Suite
231: Remove Launch-Time JRE Version Selection
232: Improve Secure Application Performance
233: Generate Run-Time Compiler Tests Automatically
235: Test Class-File Attributes Generated by javac
236: Parser API for Nashorn
237: Linux/AArch64 Port
240: Remove the JVM TI hprof Agent
241: Remove the jhat Tool
243: Java-Level JVM Compiler Interface
244: TLS Application-Layer Protocol Negotiation Extension
245: Validate JVM Command-Line Flag Arguments
246: Leverage CPU Instructions for GHASH and RSA
247: Compile for Older Platform Versions
248: Make G1 the Default Garbage Collector
249: OCSP Stapling for TLS
250: Store Interned Strings in CDS Archives
251: Multi-Resolution Images
252: Use CLDR Locale Data by Default
253: Prepare JavaFX UI Controls & CSS APIs for Modularization
254: Compact Strings
255: Merge Selected Xerces 2.11.0 Updates into JAXP
256: BeanInfo Annotations
257: Update JavaFX/Media to Newer Version of GStreamer
258: HarfBuzz Font-Layout Engine
( ゚д゚ )
6. ひとまとめ (1)
•ダイエット or 最適化シリーズ
•コード変更なしで JVM が速くな
るシリーズ
•143: Improve Contended Locking
•197: Segmented Code Cache
•254: Compact Strings
•232: Improve Secure Application
Performance
•246: Leverage CPU Instructions
for GHASH and RSA (intel x64/SPARC)
7. ひとまとめ (2)
•Project Jigsaw
•220: Modular Run-Time Images
•モジュール化による XML 地獄や
依存性地獄からの脱却、等
•前準備
•201: Modular Source Code
•253: Prepare JavaFX UI Controls
& CSS APIs for Modularization
8. ひとまとめ (3)
•javac 関係
• 199: Smart Java Compilation, Phase
Two
• 215: Tiered Attribution for javac
• 216: Process Import Statements
Correctly
• 217: Annotations Pipeline 2.0
• 235: Test Class-File Attributes
Generated by javac
• 247: Compile for Older Platform
Versions
9. 102: Process API Updates
•プロセス情報を扱う API が実
はなかったので追加。
110: HTTP 2 Client
•SPDYなどを含む HTTP/2 API
を追加。
10. 158: Unified JVM Logging
•今頃 JVM のログフォーマットやオ
プションを統一しようぜという流れ
•ログパーサ開発者は要注意
165: Compiler Control
•コンパイラを詳細に制御したい
変態御用達ツール
•c1・c2 それぞれに詳細設定可能
•しかも動作中のJVMにも設定可能
12. (おまけ) 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 で確認
しましょう :) なお、黒魔術なので仕組みを理解してから使いましょう
13. 211: Elide Deprecation Warnings
on Import Statements
•オオカミ少年化した warning を
一部削減
212: Resolve Lint and Doclint
Warnings
•放置されてた OpenJDK ビルドの
際に出る warning を修正
14. 213: Milling Project Coin
•Project Coin (微細版).
•IDEに任せれば良いので割愛
214: Remove GC Combinations
Deprecated in JDK 8
•使われない GC 組合せを削除
• DefNew + CMS / iCMS
• ParNew + SerialOld / iCMS
• CMS foreground(s)
• UseCMSCompactAtFullCollection
• CMSFullGCsBeforeCompaction
• UseCMSCollectionPassing
15. 219: Datagram Transport Layer
Security (DTLS)
•API for DTLS 1.0 (RFC 4347)
and DTLS 1.2 (RFC 6347)
•DTLS は Datagram Transport Layer
Security(データグラム・トランス
ポート・レイヤー・セキュリティー)
の略で、インターネット上で安全に
データを送受信するための技術のひ
とつ。by NTTPC http://www.nttpc.co.jp/yougo/DTLS.html
16. 221: Simplified Doclet API
•Docklet API の置換え
(com.sun.javadoc) .
222: jshell: The Java Shell (Read-
Eval-Print Loop)
•CLI で Java 文法を直実行
•困ったら@bitter_fox へ!
17. 223: New Version-String Scheme
•例:1.8.0_20-b62 -> 9.1.2+62
•$MAJOR.$MINOR.$SECURITY
224: HTML5 Javadoc
http://www.w3.org/html/logo/
19. 228: Add More Diagnostic
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
20. 229: Create PKCS12 Keystores
by Default
•デフォルトのセキュリティ強
化
230: Microbenchmark Suite
•JMH++
21. 231: Remove Launch-Time JRE
Version Selection
•-version: オプション削除
•-version ではない。: が付く方
•jar ファイルの “JRE-Version”
項目をマニフェストファイル
から削除
23. 236: Parser API for Nashorn
•IDE で Nashorn 対応 (のため
に Parser API を追加)
237: Linux/AArch64 Port
•ARM®
24. 240: Remove the JVM TI hprof
Agent
•Good bye hprof
•ちなみに Lambda でバグってる筈
•個人的な代用品リスト
•OProfile
•perf
•YourKit
•SystemTap (for debug)
25. 241: Remove the jhat Tool
•Good bye jhat
•個人的な代用品リスト
•Eclipse MAT
•HeapStats
26. 243: Java-Level JVM Compiler
Interface
•JVM JIT の挙動をAPIからト
レース可能に。
244: TLS Application-Layer
Protocol Negotiation Extension
•HTTP/2 サポート(JEP110)に
向けて、javax.net.ssl で TLS
ALPN をサポート。
27. 245: Validate JVM Command-
Line Flag Arguments
•一部の JVM オプションで範
囲外を指定しても、それが伝
わらないメッセージを出力し
て終了していたのを修正
28. 248: Make G1 the Default
Garbage Collector
•Oracle の鶴の一声からG1GC
をデフォルト化
•デフォルトで使ってませんよ
ね?じゃあ大丈夫。そうじゃ
なかったら場合によっては死
249: OCSP Stapling for TLS
•TLS. Support RFC 6961.
29. 250: Store Interned Strings in
CDS Archives
•G1GC 使用時に Interned
String が Class-Data Sharing
という領域に配置される
•Interned String の住所歴
•Permanent Gen (JDK6)
•Java Heap (JDK7-8)
•Class-Data Sharing (JDK9+G1)
31. 252: Use CLDR Locale Data by
Default
•Use locale data from the
Unicode Common Locale
Data Repository.
255: Merge Selected Xerces
2.11.0 Updates into JAXP
•To update JAXP from Xerces
2.7.1 to 2.11.0.
33. 257: Update JavaFX/Media to
Newer Version of GStreamer
•Update GStreamer.
•GStreamer: multimedia
framework.
258: HarfBuzz Font-Layout Engine
•ICU から HarfBuzz にフォン
トレンダリングを変更