RFR: 8254104: MethodCounters must exist before nmethod is installed
Igor Veresov
iveresov at openjdk.java.net
Wed Oct 7 15:35:08 UTC 2020
On Wed, 7 Oct 2020 15:23:15 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> 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
The need for MethodCounters to be present is driven by the tiered compilation policy. It's not needed by a compiler per
se. Moreover, you don't need it if you don't install the code. For example when compilation happens for native image
it's not needed. Anyways, seemed like an appropriate place to do it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/543
More information about the hotspot-compiler-dev
mailing list