RFR: 8264151: ciMethod::ensure_method_data() should return false is loading resulted in empty state

Igor Veresov iveresov at openjdk.java.net
Thu Mar 25 04:56:41 UTC 2021


On Thu, 25 Mar 2021 03:43:45 GMT, Dean Long <dlong at openjdk.org> wrote:

>> ciMethodData::load_data() can set the state of the MDO to empty (if it's replaying a compile). In this case we should return false from ensure_method_data().
>
> How about keeping the replay-aware code only in ciMethodData::load_data()?  It could return a boolean, then ensure_method_data() can do:
> 
> `  return _method_data->load_data();`
> 
> and load_data() would do:
> 
> #ifndef PRODUCT
>   if (ReplayCompiles) {
>     ciReplay::initialize(this);
>     if (is_empty()) {
>       return false;
>     }
>   }
> #endif
>   return true;

Ok, we can to that.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3184


More information about the hotspot-compiler-dev mailing list