src/hotspot/share/compiler/compileBroker.cpp
changeset 59249 29b0d0b61615
parent 59125 5ac4a49f5399
equal deleted inserted replaced
59248:e92153ed8bdc 59249:29b0d0b61615
  1477   int id;
  1477   int id;
  1478   if (method->is_native()) {
  1478   if (method->is_native()) {
  1479     assert(!is_osr, "can't be osr");
  1479     assert(!is_osr, "can't be osr");
  1480     // Adapters, native wrappers and method handle intrinsics
  1480     // Adapters, native wrappers and method handle intrinsics
  1481     // should be generated always.
  1481     // should be generated always.
  1482     return Atomic::add(1, &_compilation_id);
  1482     return Atomic::add(&_compilation_id, 1);
  1483   } else if (CICountOSR && is_osr) {
  1483   } else if (CICountOSR && is_osr) {
  1484     id = Atomic::add(1, &_osr_compilation_id);
  1484     id = Atomic::add(&_osr_compilation_id, 1);
  1485     if (CIStartOSR <= id && id < CIStopOSR) {
  1485     if (CIStartOSR <= id && id < CIStopOSR) {
  1486       return id;
  1486       return id;
  1487     }
  1487     }
  1488   } else {
  1488   } else {
  1489     id = Atomic::add(1, &_compilation_id);
  1489     id = Atomic::add(&_compilation_id, 1);
  1490     if (CIStart <= id && id < CIStop) {
  1490     if (CIStart <= id && id < CIStop) {
  1491       return id;
  1491       return id;
  1492     }
  1492     }
  1493   }
  1493   }
  1494 
  1494 
  1496   method->set_not_compilable_quietly("Not in requested compile id range");
  1496   method->set_not_compilable_quietly("Not in requested compile id range");
  1497   return 0;
  1497   return 0;
  1498 #else
  1498 #else
  1499   // CICountOSR is a develop flag and set to 'false' by default. In a product built,
  1499   // CICountOSR is a develop flag and set to 'false' by default. In a product built,
  1500   // only _compilation_id is incremented.
  1500   // only _compilation_id is incremented.
  1501   return Atomic::add(1, &_compilation_id);
  1501   return Atomic::add(&_compilation_id, 1);
  1502 #endif
  1502 #endif
  1503 }
  1503 }
  1504 
  1504 
  1505 // ------------------------------------------------------------------
  1505 // ------------------------------------------------------------------
  1506 // CompileBroker::assign_compile_id_unlocked
  1506 // CompileBroker::assign_compile_id_unlocked