What exactly does -XX:-TieredCompilation do?

前端 未结 3 1449
一生所求
一生所求 2020-12-07 12:28

Using java -XX:+PrintFlagsFinal I found the TieredCompilation flag, and I read about it a bit online.

Yet, I still don\'t know exactly<

3条回答
  •  死守一世寂寞
    2020-12-07 12:48

    -XX:-TieredCompilation disables intermediate compilation tiers (1, 2, 3), so that a method is either interpreted or compiled at the maximum optimization level (C2).

    As a side effect TieredCompilation flag also changes the number of compiler threads, the compilation policy and the default code cache size. Note that with TieredCompilation disabled

    • 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.

    To disable C2 compiler and to leave only C1 with no extra overhead, set -XX:TieredStopAtLevel=1.

    To disable all JIT compilers and to run everything in interpreter, use -Xint.

提交回复
热议问题