Skip to content
Permalink
Browse files
8264151: ciMethod::ensure_method_data() should return false is loadin…
…g resulted in empty state

Reviewed-by: dlong, kvn
  • Loading branch information
Igor Veresov committed Mar 26, 2021
1 parent 4e708e5 commit fe8ef3223d3ef93c822980c84e01afabd046d399
Showing 3 changed files with 8 additions and 5 deletions.
@@ -965,8 +965,7 @@ bool ciMethod::ensure_method_data(const methodHandle& h_m) {
}
if (h_m()->method_data() != NULL) {
_method_data = CURRENT_ENV->get_method_data(h_m()->method_data());
_method_data->load_data();
return true;
return _method_data->load_data();
} else {
_method_data = CURRENT_ENV->get_empty_methodData();
return false;
@@ -170,10 +170,10 @@ void ciMethodData::load_remaining_extra_data() {
}
}

void ciMethodData::load_data() {
bool ciMethodData::load_data() {
MethodData* mdo = get_MethodData();
if (mdo == NULL) {
return;
return false;
}

// To do: don't copy the data if it is not "ripe" -- require a minimum #
@@ -263,8 +263,12 @@ void ciMethodData::load_data() {
#ifndef PRODUCT
if (ReplayCompiles) {
ciReplay::initialize(this);
if (is_empty()) {
return false;
}
}
#endif
return true;
}

void ciReceiverTypeData::translate_receiver_data_from(const ProfileData* data) {
@@ -507,7 +507,7 @@ class ciMethodData : public ciMetadata {
void set_parameter_type(int i, ciKlass* k);
void set_return_type(int bci, ciKlass* k);

void load_data();
bool load_data();

// Convert a dp (data pointer) to a di (data index).
int dp_to_di(address dp) {

1 comment on commit fe8ef32

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on fe8ef32 Mar 26, 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.