[jdk17u-dev] RFR: 8300926: Several startup regressions ~6-70% in 21-b6 all platforms [v3]

Alexey Pavlyutkin duke at openjdk.org
Mon Apr 17 14:08:35 UTC 2023


> Hi, here is backport of [JDK-8300926](https://bugs.openjdk.org/browse/JDK-8300926). The patch splits deoptimization routine into two separate phases: the first implies only marking methods to be deoptimized, and the second is proper deoptimization. Only the first one is run under taken Compile_lock. Without the patch the lock stays taken during whole deoptimization routine and that prevents compilations from other threads.
> 
> Original patch is applied with the following changes:
> 
> - changes to `void LambdaFormInvokers::regenerate_class(char* class_name, ClassFileStream& st, TRAPS)` applied to `void LambdaFormInvokers::reload_class(char* name, ClassFileStream& st, TRAPS)`
> - `SystemDictionary::add_to_hierarchy(JavaThread* current, InstanceKlass* k)`
> changed to `SystemDictionary::add_to_hierarchy(Thread* current, InstanceKlass* k)`,
> cuz in 17 it's also called from
> `SystemDictionaryShared::add_unregistered_class(Thread* current, InstanceKlass* k)`
> - `SystemDictionary::add_to_hierarchy(JavaThread* current, InstanceKlass* k)` does not lock/unlock k->init_monitor()
> - changes to `void CodeCache::make_marked_nmethods_deoptimized()` skipped
> - removal of absent `void CodeCache::make_nmethod_deoptimized(CompiledMethod* nm)` ignored
> - substitution of `CompiledMethod::MarkForDeoptimizationStatus` with `DeoptimizationStatus` and related changes are skipped because in 17 `_mark_for_deoptimization_status` always accessed under CompiledMethod_lock;
> - changes to `void DependencyContext::mark_dependent_nmethods(DeoptimizationScope* deopt_scope, DepChange& changes)` applied with respect to the difference in baselines
> - `void DependencyContext::remove_and_mark_for_deoptimization_all_dependents(DeoptimizationScope* deopt_scope)` completely ported with respect to baseline
> - changes to nmethod related to Virtual Threads were skipped
> - changes to `void InstanceKlass::initialize_impl(TRAPS)` applied to `bool InstanceKlass::link_class_impl(TRAPS)`
> 
> Regression: hotspot_all (amd64/20.04LTS) - no new failures +  `runtime/cds/appcds/dynamicArchive/LambdaProxyDuringShutdown.java` previously failing now passes

Alexey Pavlyutkin has updated the pull request incrementally with one additional commit since the last revision:

  removing trailing whitespaces

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

Changes:
  - all: https://git.openjdk.org/jdk17u-dev/pull/1243/files
  - new: https://git.openjdk.org/jdk17u-dev/pull/1243/files/6f55fbde..8510977a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=1243&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=1243&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/1243.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/1243/head:pull/1243

PR: https://git.openjdk.org/jdk17u-dev/pull/1243


More information about the jdk-updates-dev mailing list