【问题标题】:How to understand jstat -printcompilation output如何理解 jstat -printcompilation 输出
【发布时间】:2022-11-02 04:53:00
【问题描述】:
jstat -printcompilation pid 

可以获取有关最后编译的方法的信息,例如:

Compiled  Size  Type Method
     207     64    1 java/lang/CharacterDataLatin1 toUpperCase
     208      5    1 java/math/BigDecimal$StringBuilderHelper getCharArray

第三列是什么意思? 我找不到有关“类型”的详细信息。包括几种类型?

https://docs.oracle.com/javase/9/tools/jstat.htm#JSWOR734

oracle 文档还没有足够的信息

【问题讨论】:

    标签: java jvm jit jstat


    【解决方案1】:

    Type 列中的值对应于this 枚举:

    1 = normal_compile  // Regular JIT compilation
    2 = osr_compile     // On-stack replacement
    3 = native_compile  // Compiled wrapper for a native method
    

    但是,normal_compile 以外的值仅在 -XX:+CICountOSR-XX:+CICountNative 选项为 set 时的 JVM 调试版本中可用:

      int last_compile_type = normal_compile;
      if (CICountOSR && is_osr) {
        last_compile_type = osr_compile;
      } else if (CICountNative && method->is_native()) {
        last_compile_type = native_compile;
      }
    

    实际上,这意味着Type 始终是1 与常规JDK。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多