问题描述
使用 java -XX:+ PrintFlagsFinal
我找到 TieredCompilation
标志,我在线阅读了一下。
Using java -XX:+PrintFlagsFinal
I found the TieredCompilation
flag, and I read about it a bit online.
然而,我仍然不知道完全将其设置为 false $ c $时会发生什么c>。
Yet, I still don't know exactly what happens when setting it to false
.
我知道编译系统支持5个执行级别,基本上分为解释器C1和C2:
I know that the compilation system supports 5 execution levels, basically splitted into interpreter, C1 and C2:
- 0级 - 翻译
- 1级 - 完全优化的C1(无分析)
- 2级 - 具有调用和后备计数器的C1
- 级别3 - 具有完整性能分析的C1(级别2 + MDO)
- 级别4 - C2
- level 0 - interpreter
- level 1 - C1 with full optimization (no profiling)
- level 2 - C1 with invocation and backedge counters
- level 3 - C1 with full profiling (level 2 + MDO)
- level 4 - C2
来源:;
- there will be less compiler threads;
- simple compilation policy (based on method invocation and backedge counters) will be chosen instead of advanced compilation policy;
- default reserved code cache size will be 5 times smaller.
要禁用C2编译器并且只留下C1而没有额外开销,请设置 -XX:TieredStopAtLevel = 1
。
To disable C2 compiler and to leave only C1 with no extra overhead, set -XX:TieredStopAtLevel=1
.
要禁用所有JIT编译器并在解释器中运行所有内容,请使用 -Xint
。
To disable all JIT compilers and to run everything in interpreter, use -Xint
.
这篇关于究竟什么-XX:-TieredCompilation呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!