RFR: 8254104: MethodCounters must exist before nmethod is installed

Vladimir Kozlov kvn at openjdk.java.net
Wed Oct 7 15:26:09 UTC 2020


On Wed, 7 Oct 2020 14:48:09 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> Ensure that MethodCounters for a particular method exist during the nmethod install (for methods that were never run
>> before). Tiered compilation policy depends on the state stored in the counters to function properly.
>
> Marked as reviewed by dnsimon (Committer).

Would be great if you explain in what cases you don't have MethodCounters  *AFTER* compilation?
Should you do that at the beginning of compilation?
We do check for presence of MDO during start of compilation (C2 example):
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/compile.cpp#L599

-------------

PR: https://git.openjdk.java.net/jdk/pull/543


More information about the hotspot-compiler-dev mailing list