RFR: 8227745: Enable Escape Analysis for Better Performance in the Presence of JVMTI Agents
Richard Reingruber
rrich at openjdk.java.net
Mon Sep 14 14:45:23 UTC 2020
On Mon, 14 Sep 2020 04:58:47 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Hi,
>>
>> this is the continuation of the review of the implementation for:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8227745
>> https://bugs.openjdk.java.net/browse/JDK-8233915
>>
>> It allows for JIT optimizations based on escape analysis even if JVMTI agents acquire capabilities to access references
>> to objects that are subject to such optimizations, e.g. scalar replacement. The implementation reverts such
>> optimizations just before access very much as when switching from JIT compiled execution to the interpreter, aka
>> "deoptimization". Webrev.8 was the last one before before the transition to Git/Github:
>>
>> http://cr.openjdk.java.net/~rrich/webrevs/8227745/webrev.8/
>>
>> Thanks, Richard.
>
> src/hotspot/share/compiler/compileBroker.cpp line 844:
>
>> 842: void DeoptimizeObjectsALotThread::deoptimize_objects_alot_loop_single() {
>> 843: HandleMark hm(this);
>> 844: while (!this->is_terminated()) {
>
> The terminated state of a thread is used to communicate to other threads whether this thread has terminated. It isn't
> something that can be used to control the work-loop of the thread itself! This is an infinite loop as far as I can see.
You're right. Thanks. I'll make it an explicit infinite loop. This should be ok because DeoptimizeObjectsALotThread's
as the other threads created in CompileBroker::make_thread() are daemon threads.
> src/hotspot/share/compiler/compileBroker.cpp line 862:
>
>> 860: void DeoptimizeObjectsALotThread::deoptimize_objects_alot_loop_all() {
>> 861: HandleMark hm(this);
>> 862: while (!is_terminated()) {
>
> Same comment as above.
Same reply :)
-------------
PR: https://git.openjdk.java.net/jdk/pull/119
More information about the serviceability-dev
mailing list