RFR: 8261229: MethodData is not correctly initialized with TieredStopAtLevel=3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8261229: MethodData is not correctly initialized with TieredStopAtLevel=3

Igor Veresov-3
Mostly a typo in compilation mode ergonomics that selected a quick-only mode essentially when the user specified TieredStopAtLevel={1,2,3}. The quick-only mode has an optimization that eliminates parts of the MDO since they are not needed. Meanwhile, the WB API considered it a fair game to request a level 3 compile, that requires a full MDO.

The fix corrects the original issue and also tries to be extra defensive with WB API (since it's semantics is not clearly specified) by always allocating full MDO if WB API is on.

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

Commit messages:
 - Be defensive with respect to WB API
 - Fix compilation mode ergonomics

Changes: https://git.openjdk.java.net/jdk/pull/2444/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2444&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261229
  Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2444.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2444/head:pull/2444

PR: https://git.openjdk.java.net/jdk/pull/2444
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261229: MethodData is not correctly initialized with TieredStopAtLevel=3

Igor Ignatyev-2
On Sat, 6 Feb 2021 06:16:45 GMT, Igor Veresov <[hidden email]> wrote:

> Mostly a typo in compilation mode ergonomics that selected a quick-only mode essentially when the user specified TieredStopAtLevel={1,2,3}. The quick-only mode has an optimization that eliminates parts of the MDO since they are not needed. Meanwhile, the WB API considered it a fair game to request a level 3 compile, that requires a full MDO.
>
> The fix corrects the original issue and also tries to be extra defensive with WB API (since it's semantics is not clearly specified) by always allocating full MDO if WB API is on.

I don't think we should adjust the product code to behave differently just to satisfy the incorrect assumptions of WhiteBox. it also kinda defeats the purpose of WhiteBox API as we won't be able to go thru the same code path.

-- Igor

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

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