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

Dean Long dlong at openjdk.java.net
Thu Mar 25 03:46:39 UTC 2021


On Wed, 24 Mar 2021 23:47:43 GMT, Igor Veresov <iveresov 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;

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

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


More information about the hotspot-compiler-dev mailing list