RFR: 8256754: Deoptimization::revoke_for_object_deoptimization: stack processing start call is redundant

Dean Long dlong at openjdk.java.net
Mon Nov 23 22:43:59 UTC 2020


On Mon, 23 Nov 2020 11:40:49 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

> This is a XS clean-up of Deoptimization::revoke_for_object_deoptimization() which removes the StackWatermarkSet::start_processing() call.
> 
> This is correct because all paths leading to revoke_for_object_deoptimization() are equipped with a KeepStackGCProcessedMark.
> 
> Call Tree:
> 
> StackWatermarkSet::start_processing(JavaThread *, enum StackWatermarkKind) : void
>     Deoptimization::revoke_for_object_deoptimization(JavaThread *, frame, RegisterMap *, JavaThread *) : void
>         Deoptimization::deoptimize_objects_internal(JavaThread *, GrowableArray<compiledVFrame *> *, bool &) : bool
>             EscapeBarrier::deoptimize_objects_internal(JavaThread *, intptr_t *) : bool
>                 EscapeBarrier::deoptimize_objects_all_threads() : bool                     // has KeepStackGCProcessedMark
>                 EscapeBarrier::deoptimize_objects(intptr_t *) : bool
>                     EscapeBarrier::deoptimize_objects(int, int) : bool                     // has KeepStackGCProcessedMark 
> 
> Testing: hotspot_serviceability, jdk_svc, jdk_jdi, vmTestbase_nsk_jdi, vmTestbase_nsk_jvmti, vmTestbase_nsk_jdwp with -XX:+UseZGC.

The justification for removing this code is that all callers use KeepStackGCProcessedMark.  Is there an assert you can add in place of the removed code that checks this invariant?

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

Changes requested by dlong (Reviewer).

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


More information about the hotspot-dev mailing list