RFR: JDK-8292561: Make "ReplayCompiles" a diagnostic product switch [v2]

Xin Liu xliu at openjdk.org
Sat Aug 20 23:54:27 UTC 2022


On Sat, 20 Aug 2022 06:16:07 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> See discussion: https://mail.openjdk.org/pipermail/hotspot-compiler-dev/2022-August/057988.html
>> 
>> Making ReplayCompiles a (diagnostic) runtime switch can help when facing problems with shipped release VMs:
>> - Investigate the effects of compiler errors in shipped VMs to estimate the bug impact
>> - Investigate if a given build is affected by a compiler bug
>> 
>> Making the option product increases libjvm.so text size by 54kb (Linux x64). No measurable runtime overhead.
>> 
>> Tests: Almost all tests in compiler/ciReplay generate replay files by inducing a crash with `-XX:CICrashAt`. That won't work in release builds. I added a simple test that checks that invalid replay files are correctly refused, and that test can also be done on a release VM. So we at least have a test for release that checks argument parsing.
>> 
>> (Note: I have https://github.com/openjdk/jdk/pull/9891 open, which could in the future serve as an alternative to CICrashAt by limiting the compiler arena).
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Feedback Vladimir

LGTM. I am not a reviewer.

I tried this feature and it works as expected.
I dump 4 replay files using this option `-XX:CompileCommand=DumpReplay,java.util.HashMap::putVal`.

2 of them are c1 and 2 are c2. I see **ReplayCompiles** works in release build and it also accepts unresolved klasses. eg. 


Warning: entry was unresolved in the replay data: jdk/internal/misc/VM
Warning: entry was unresolved in the replay data: jdk/internal/loader/ClassLoaders
Warning: entry was unresolved in the replay data: jdk/internal/misc/Unsafe
Warning: entry was unresolved in the replay data: java/lang/invoke/StringConcatFactory
Warning: entry was unresolved in the replay data: java/lang/ClassLoader
Warning: entry was unresolved in the replay data: java/lang/Thread
Warning: entry was unresolved in the replay data: jdk/internal/loader/ClassLoaders
Warning: entry was unresolved in the replay data: jdk/internal/loader/BootLoader
Warning: entry was unresolved in the replay data: jdk/internal/module/ServicesCatalog
Warning: entry was unresolved in the replay data: java/lang/module/ModuleDescriptor$Opens
Warning: entry was unresolved in the replay data: java/lang/System
Warning: entry was unresolved in the replay data: java/util/concurrent/ConcurrentHashMap$ForwardingNode
    272   26    b  3       java.util.HashMap::putVal (300 bytes)

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

Marked as reviewed by xliu (Committer).

PR: https://git.openjdk.org/jdk/pull/9935


More information about the hotspot-compiler-dev mailing list