Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8262443: GenerateOopMap::do_interpretation can spin for a long time. #2742

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/hotspot/share/oops/generateOopMap.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -906,12 +907,15 @@ 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()) {
robehn marked this conversation as resolved.
Show resolved Hide resolved
if (thread->as_Java_thread()->thread_state() == _thread_in_vm) {
ThreadBlockInVM tbivm(thread->as_Java_thread());
}
}
robehn marked this conversation as resolved.
Show resolved Hide resolved
#ifndef PRODUCT
if (TraceNewOopMapGeneration) {
tty->print("\n\nIteration #%d of do_interpretation loop, method:\n", i);
Expand Down Expand Up @@ -2129,7 +2133,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())
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/generateOopMap.hpp
Expand Up @@ -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 ();
Expand Down