8300926: Several startup regressions ~6-70% in 21-b6 all platforms

Reviewed-by: eosterlund, dcubed, coleenp
This commit is contained in:
Robbin Ehn 2023-03-13 09:34:00 +00:00
parent 31e1e3975b
commit c183fce954
24 changed files with 340 additions and 234 deletions

View file

@ -1591,7 +1591,11 @@ void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, JV
// the address field to still be pointing at the nmethod.
} else {
// Deoptimize the nmethod immediately.
Deoptimization::deoptimize_all_marked(nm);
DeoptimizationScope deopt_scope;
deopt_scope.mark(nm);
nm->make_not_entrant();
nm->make_deoptimized();
deopt_scope.deoptimize_marked();
// A HotSpotNmethod instance can only reference a single nmethod
// during its lifetime so simply clear it here.