Integrated: 8275908: Record null_check traps for calls and array_check traps in the interpreter

Volker Simonis simonis at openjdk.java.net
Fri Nov 26 16:24:13 UTC 2021


On Wed, 24 Nov 2021 16:33:35 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> `null_checks` occurring at invoke bytecodes are currently not recorded by the profiler. This leads to unnecessary uncommon traps, deoptimizations and recompilations for exceptions which already occurred before the compilation (i.e. are "hot"). This change fixes the problem in the interpreter.
> 
> `array_checks` are currently recorded as `class_checks` in the interpreter and therefore not recognized by the compiler. This again leads to uncommon traps, deoptimizations and recompilations. This change unifies the handling of `array_checks` in the interpreter and compiler and prevents unnecessary recompilation.
> 
> The test is a stripped down version of a test which was developed for [JDK-8273563: Improve performance of implicit exceptions with -XX:-OmitStackTraceInFastThrow](https://bugs.openjdk.java.net/browse/JDK-8273563) (still [under review](https://github.com/openjdk/jdk/pull/5488)). It introduces an extension to the Whitebox API to expose the decompile, deopt and trap counters which is also required for testing [JDK-8273563](https://bugs.openjdk.java.net/browse/JDK-8273563). I think (and hope) it will also be helpful for others in the future.

This pull request has now been integrated.

Changeset: 40fef231
Author:    Volker Simonis <simonis at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/40fef2311c95eca0ec34652f9fc0e56b827b8380
Stats:     637 lines in 9 files changed: 628 ins; 1 del; 8 mod

8275908: Record null_check traps for calls and array_check traps in the interpreter

Reviewed-by: chagedorn, mdoerr

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

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


More information about the hotspot-dev mailing list