-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C1/C2资料汇编 #337
Comments
C1 原始论文:A Compiler for the Java HotSpot Virtual Machine ( Robert Griesemer) 源于书籍:The School of Niklaus Wirth |
Despite being called server JVMs, the distinction between client and server compilers Historically, JVM developers (and even some tools) sometimes referred to the com‐ The primary difference between the two compilers is their aggressiveness in compil‐ The engineering trade-off here is the knowledge the C2 compiler gains while it waits: ——P93-94 《Java Performance——In-Depth Advice for Tuning and Programming Java 8, 11, and Beyond (SECOND EDITION)》 |
In addition, if you still have an old Windows machine with a 32-bit JVM, the total ——P95 《Java Performance——In-Depth Advice for Tuning and Programming Java 8, 11, and Beyond (SECOND EDITION)》 |
Tiered Compilation Levels The compilation log for a program using tiered compilation prints the tier level at 0 A typical compilation log shows that most methods are first compiled at level 3: full If the C2 compiler queue is full, methods will be pulled from the C2 queue and com‐ On the other hand, if the C1 compiler queue is full, a method that is scheduled for Trivial methods may start in either level 2 or 3 but then go to level 1 because of their Flags control some of this behavior, but expecting results when tuning at this level is ——P107-108 《Java Performance——In-Depth Advice for Tuning and Programming Java 8, 11, and Beyond (SECOND EDITION)》 分层编译选项:-XX:+TieredCompilation |
入门C2最好的材料就是Thomas Würthinger写的关于IdealGraphVisualizer的硕士论文: C2的整体介绍最好的资料还是原始论文: Overview of Ideal, C2's high level intermediate representation, HotSpot Internals, OpenJDK Wiki From: https://blog.csdn.net/fishmai/article/details/77824224 |
调试C1、C2中可能会用到的选项: printassembly https://wiki.openjdk.java.net/display/HotSpot/PrintAssembly |
查询资料遇到的一篇C2的交流讨论帖子 |
其中提到的三个slide: |
-XX:+LogCompilation |
C1 compiler
Fast, lightly optimizing bytecode compiler. Performs some value numbering, inlining, and class analysis. Uses a simple CFG-oriented SSA "high" IR, a machine-oriented "low" IR, a linear scan register allocation, and a template-style code generator.
C2 compiler
Highly optimizing bytecode compiler, also known as 'opto'. Uses a "sea of nodes" SSA "ideal" IR, which lowers to a machine-specific IR of the same kind. Has a graph-coloring register allocator; colors all machine state, including local, global, and argument registers and stack. Optimizations include global value numbering, conditional constant type propagation, constant folding, global code motion, algebraic identities, method inlining (aggressive, optimistic, and/or multi-morphic), intrinsic replacement, loop transformations (unswitching, unrolling), array range check elimination.
From: https://openjdk.java.net/groups/hotspot/docs/HotSpotGlossary.html
The text was updated successfully, but these errors were encountered: