Skip to content
Permalink
Browse files
8257847: Tiered should publish MDO data pointer for interpreter after…
… profile start

Reviewed-by: thartmann, kvn, dlong
  • Loading branch information
Igor Veresov committed Dec 9, 2020
1 parent 2a62d5d commit 10da767c2fd29bbaa00d33083d90e09e4fd34ec9
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/hotspot/share/compiler/tieredThresholdPolicy.cpp
@@ -790,7 +790,7 @@ bool TieredThresholdPolicy::is_mature(Method* method) {
// start profiling without waiting for the compiled method to arrive.
// We also take the load on compilers into the account.
bool TieredThresholdPolicy::should_create_mdo(const methodHandle& method, CompLevel cur_level) {
if (cur_level != CompLevel_none || force_comp_at_level_simple(method)) {
if (cur_level != CompLevel_none || force_comp_at_level_simple(method) || !ProfileInterpreter) {
return false;
}
int i = method->invocation_count();
@@ -826,6 +826,18 @@ void TieredThresholdPolicy::create_mdo(const methodHandle& mh, Thread* THREAD) {
if (mh->method_data() == NULL) {
Method::build_interpreter_method_data(mh, CHECK_AND_CLEAR);
}
if (ProfileInterpreter) {
MethodData* mdo = mh->method_data();
if (mdo != NULL) {
JavaThread* jt = THREAD->as_Java_thread();
frame last_frame = jt->last_frame();
if (last_frame.is_interpreted_frame() && mh == last_frame.interpreter_frame_method()) {
int bci = last_frame.interpreter_frame_bci();
address dp = mdo->bci_to_dp(bci);
last_frame.interpreter_frame_set_mdp(dp);
}
}
}
}


1 comment on commit 10da767

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 10da767 Dec 9, 2020

Please sign in to comment.