Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8357424

[JVMCI] Avoid incrementing decompilation count for hosted compiled nmethod

XMLWordPrintable

      Truffle compilations increment the hotspot method decompile count for the method OptimizedCallTarget#profiledPERoot: https://github.com/openjdk/jdk/blob/0110acaa9086e5adb49be4fff06d66f96b821119/src/hotspot/share/oops/methodData.hpp#L2417

      In case the Java highest tier compilation of the method OptimizedCallTarget#profiledPERoot is to be scheduled after the decompile count exceeds 400 (https://github.com/openjdk/jdk/blob/526951dba731f0e733e22a3bff7ac7a18ce9dece/src/hotspot/share/runtime/globals.hpp#L1345), the method is not compiled and permanently excluded from the highest tier compilation.

      A proposed solution from Tom Rodriguez is to convert JVMCINMethodData::_has_name to a bitfield and add a _is_default field that corresponds to jdk.vm.ci.hotspot.HotSpotNmethod#isDefault. A hosted nmethod will have _is_default == false. Only non-hosted nmethods should increment the decompile count.

            yzheng Yudi Zheng
            yzheng Yudi Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: