Integrated: 8350983: JShell LocalExecutionControl only needs stopCheck() on backward branches

Archie Cobbs acobbs at openjdk.org
Wed Apr 23 13:26:08 UTC 2025


On Sat, 1 Mar 2025 03:14:20 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

> JShell's `LocalExecutionControl` ensures a running eval thread can be stopped by `JShell.stop()` by inserting an invocation of `stopCheck()` at every branch point in the bytecode of loaded classfiles.
> 
> However, this same guarantee can be provided by invoking `stopCheck()` only at backward branches and not at forward branches. By doing this, the performance and size impact on the executing code can be reduced.
> 
> Fortunately the new ClassFile API makes this kind of modification easy 👍

This pull request has now been integrated.

Changeset: a372937d
Author:    Archie Cobbs <acobbs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a372937d8480404e69eff43682c91506997fd8ee
Stats:     19 lines in 1 file changed: 13 ins; 0 del; 6 mod

8350983: JShell LocalExecutionControl only needs stopCheck() on backward branches

Reviewed-by: jlahoda, liach, asotona

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

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


More information about the kulla-dev mailing list