Skip to content
Permalink
Browse files
8262443: GenerateOopMap::do_interpretation can spin for a long time.
Reviewed-by: coleenp, dholmes, dcubed
  • Loading branch information
robehn committed Mar 11, 2021
1 parent 32cbd19 commit 7988c1d9aa7e3b990c17fdf5e31195e66e7fc5f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
@@ -34,6 +34,7 @@
#include "oops/oop.inline.hpp"
#include "oops/symbol.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/relocator.hpp"
@@ -906,12 +907,18 @@ void GenerateOopMap::monitor_push(CellTypeState cts) {
// Interpretation handling methods
//

void GenerateOopMap::do_interpretation()
void GenerateOopMap::do_interpretation(Thread* thread)
{
// "i" is just for debugging, so we can detect cases where this loop is
// iterated more than once.
int i = 0;
do {
if (i != 0 && thread->is_Java_thread()) {
JavaThread* jt = thread->as_Java_thread();
if (jt->thread_state() == _thread_in_vm) {
// Since this JavaThread has looped at least once and is _thread_in_vm,
// we honor any pending blocking request.
ThreadBlockInVM tbivm(jt);
}
}
#ifndef PRODUCT
if (TraceNewOopMapGeneration) {
tty->print("\n\nIteration #%d of do_interpretation loop, method:\n", i);
@@ -2129,7 +2136,7 @@ void GenerateOopMap::compute_map(TRAPS) {

// Step 3: Calculate stack maps
if (!_got_error)
do_interpretation();
do_interpretation(THREAD);

// Step 4:Return results
if (!_got_error && report_results())
@@ -374,7 +374,7 @@ class GenerateOopMap {
static void reachable_basicblock (GenerateOopMap *c, int deltaBci, int *data);

// Interpretation methods (primary)
void do_interpretation ();
void do_interpretation (Thread* thread);
void init_basic_blocks ();
void setup_method_entry_state ();
void interp_all ();

1 comment on commit 7988c1d

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 7988c1d Mar 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.