From 46bca5bb773ba44223b121e1029a541650df7ffb Mon Sep 17 00:00:00 2001 From: kvn Date: Tue, 29 Apr 2014 10:29:56 -0700 Subject: [PATCH] 8041959: Skip replay parsing errors with ReplayIgnoreInitErrors Summary: Allow replay compilation with replay file parsing error. Reviewed-by: twisti, iveresov --- src/share/vm/ci/ciReplay.cpp | 16 ++++++++++++---- src/share/vm/runtime/simpleThresholdPolicy.cpp | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/share/vm/ci/ciReplay.cpp b/src/share/vm/ci/ciReplay.cpp index e88081509..6acde213d 100644 --- a/src/share/vm/ci/ciReplay.cpp +++ b/src/share/vm/ci/ciReplay.cpp @@ -376,11 +376,15 @@ class CompileReplay : public StackObj { int c = getc(_stream); while(c != EOF) { c = get_line(c); - process_command(CHECK); + process_command(THREAD); if (had_error()) { tty->print_cr("Error while parsing line %d: %s\n", line_no, _error_message); - tty->print_cr("%s", _buffer); - return; + if (ReplayIgnoreInitErrors) { + CLEAR_PENDING_EXCEPTION; + _error_message = NULL; + } else { + return; + } } line_no++; } @@ -565,10 +569,14 @@ class CompileReplay : public StackObj { void process_ciMethodData(TRAPS) { Method* method = parse_method(CHECK); if (had_error()) return; - /* jsut copied from Method, to build interpret data*/ + /* just copied from Method, to build interpret data*/ if (InstanceRefKlass::owns_pending_list_lock((JavaThread*)THREAD)) { return; } + // To be properly initialized, some profiling in the MDO needs the + // method to be rewritten (number of arguments at a call for + // instance) + method->method_holder()->link_class(CHECK); // methodOopDesc::build_interpreter_method_data(method, CHECK); { // Grab a lock here to prevent multiple diff --git a/src/share/vm/runtime/simpleThresholdPolicy.cpp b/src/share/vm/runtime/simpleThresholdPolicy.cpp index 1e78f215d..a14a67b43 100644 --- a/src/share/vm/runtime/simpleThresholdPolicy.cpp +++ b/src/share/vm/runtime/simpleThresholdPolicy.cpp @@ -192,6 +192,10 @@ nmethod* SimpleThresholdPolicy::event(methodHandle method, methodHandle inlinee, thread->is_interp_only_mode()) { return NULL; } + if (CompileTheWorld || ReplayCompiles) { + // Don't trigger other compiles in testing mode + return NULL; + } nmethod *osr_nm = NULL; handle_counter_overflow(method()); -- GitLab