8263017: Read barriers are missing in nmethod printing code

Reviewed-by: eosterlund, kvn
This commit is contained in:
Vladimir Ivanov 2021-03-12 17:29:48 +00:00
parent a6e056fd51
commit 0b10c6b415

View file

@ -936,6 +936,8 @@ void nmethod::maybe_print_nmethod(DirectiveSet* directive) {
}
void nmethod::print_nmethod(bool printmethod) {
run_nmethod_entry_barrier(); // ensure all embedded OOPs are valid before printing
ttyLocker ttyl; // keep the following output all in one block
if (xtty != NULL) {
xtty->begin_head("print_nmethod");