[jdk16] RFR: 8257919: [JVMCI] profiling info didn't change after reprofile
Vladimir Ivanov
vlivanov at openjdk.java.net
Fri Dec 11 17:30:57 UTC 2020
On Fri, 11 Dec 2020 09:23:18 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> JDK-8252049 moved compiler counter initialization into MethodData constructor, but JVMCI and WhiteBox API rely on `MethodData::initialize()`/`MethodData::init()` to reset MDO state.
>>
>> Proposed fix restores the logic which resets the counters in `init()` (which is called from `initialize()`).
>>
>> Testing:
>> - [x] hs-precheckin-comp, hs-tier1, hs-tier2
>
> I guess the compiler will outsmart the back-to-back initialization but for clarity maybe the `MethodData` constructor should now initialize `_compiler_counters` using the empty constructor?
After thinking more about it, I decided to revert `creation_mileage` change and move it back to MethodData: it turns out WhiteBox API deliberately keeps it intact while resetting other compiler-related counters (by calling `MethodData::init()` which was deliberately separated from `MethodData::initialize()` in JDK-8007288). Now it should be back to pre-8252049 state and keeps the fix focused on native leak. The `MDO`/`ciMD` implementations can be refactored later.
> I guess the compiler will outsmart the back-to-back initialization but for clarity maybe the MethodData constructor should now initialize _compiler_counters using the empty constructor?
Good point. Latest commit addresses that.
-------------
PR: https://git.openjdk.java.net/jdk16/pull/6
More information about the hotspot-compiler-dev
mailing list