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

Dead code in CompileTrainingData::notice_jit_observation

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • hotspot
    • None

      (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?

            iveresov Igor Veresov
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: