Dead code in CompileTrainingData::notice_jit_observation

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • tbd
    • Affects Version/s: 25
    • Component/s: hotspot

      (synopsis is provisional, change as you see fit)

      SonarCloud complains after JDK-8355003 integration:

      void CompileTrainingData::notice_jit_observation(ciEnv* env, ciBaseObject* what) {
        // A JIT is starting to look at class k.
        // We could follow the queries that it is making, but it is
        // simpler to assume, conservatively, that the JIT will
        // eventually depend on the initialization state of k.
        CompileTask* task = env->task();
        assert(task != nullptr, "");
        Method* method = task->method();
        InstanceKlass* compiling_klass = method->method_holder(); // <--- UNUSED

      Looks like this entire block is dead. Please check if there is coding error somewhere?

            Assignee:
            Igor Veresov
            Reporter:
            Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: