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

[JVMCI] assertion for allocation of "too many" CompileTasks must take JVMCI into account

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      9
    • Resolved In Build:
      b96

      Description

      Normally -Xcomp implies -Xbatch. However when a JVMCI compiler is in use, the CompileBroker has special logic to prevent blocking compilations from causing a deadlock between JVMCI compiler threads and other threads. Until they are themselves compiled, JVMCI compilers are slower than native compilers. This means the compilation queue can back up quickly and require more CompileTasks to be created. There's an assertion that the number of CompileTasks allocated never exceeds 10000 (see code below from compileTask.cpp). This assertion needs to be modified if a JVMCI compiler is in use.

      CompileTask* CompileTask::allocate() {
        MutexLocker locker(CompileTaskAlloc_lock);
        CompileTask* task = NULL;

        if (_task_free_list != NULL) {
          task = _task_free_list;
          _task_free_list = task->next();
          task->set_next(NULL);
        } else {
          task = new CompileTask();
          DEBUG_ONLY(_num_allocated_tasks++;)
          assert (WhiteBoxAPI || _num_allocated_tasks < 10000, "Leaking compilation tasks?");
          task->set_next(NULL);
          task->set_is_free(true);
        }
        assert(task->is_free(), "Task must be free.");
        task->set_is_free(false);
        return task;
      }

        Attachments

          Activity

            People

            • Assignee:
              dnsimon Douglas Simon
              Reporter:
              dnsimon Douglas Simon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: