Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160942

Unused code in GraphKit::record_profiled_receiver_for_speculation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 9
    • 9
    • hotspot
    • b138

      JDK-8031755 introduced a "return n" in GraphKit::record_profiled_receiver_for_speculation() which is never executed and an assignment to 'maybe_null' that has no effect:
      http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/37023a7f1e1b#l7.99

      + bool maybe_null = true;
      + if (java_bc() == Bytecodes::_checkcast ||
      + java_bc() == Bytecodes::_instanceof ||
      + java_bc() == Bytecodes::_aastore) {
      + ciProfileData* data = method()->method_data()->bci_to_data(bci());
      + bool maybe_null = data == NULL ? true : data->as_BitData()->null_seen();
      + }
      + return record_profile_for_speculation(n, exact_kls, maybe_null);
      + return n;

            phedlin Patric Hedlin (Inactive)
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: