This commit is contained in:
Alejandro Murillo 2014-07-18 12:02:54 -07:00
commit f4aa8d51a5
90 changed files with 1856 additions and 886 deletions

View file

@ -297,6 +297,7 @@ void CompileTask::initialize(int compile_id,
_hot_count = hot_count;
_time_queued = 0; // tidy
_comment = comment;
_failure_reason = NULL;
if (LogCompilation) {
_time_queued = os::elapsed_counter();
@ -566,6 +567,11 @@ void CompileTask::log_task_done(CompileLog* log) {
methodHandle method(thread, this->method());
ResourceMark rm(thread);
if (!_is_success) {
const char* reason = _failure_reason != NULL ? _failure_reason : "unknown";
log->elem("failure reason='%s'", reason);
}
// <task_done ... stamp='1.234'> </task>
nmethod* nm = code();
log->begin_elem("task_done success='%d' nmsize='%d' count='%d'",
@ -733,6 +739,7 @@ void CompileQueue::purge_stale_tasks() {
for (CompileTask* task = head; task != NULL; ) {
CompileTask* next_task = task->next();
CompileTaskWrapper ctw(task); // Frees the task
task->set_failure_reason("stale task");
task = next_task;
}
}
@ -1786,6 +1793,7 @@ void CompileBroker::compiler_thread_loop() {
} else {
// After compilation is disabled, remove remaining methods from queue
method->clear_queued_for_compilation();
task->set_failure_reason("compilation is disabled");
}
}
}
@ -1973,6 +1981,7 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
compilable = ci_env.compilable();
if (ci_env.failing()) {
task->set_failure_reason(ci_env.failure_reason());
const char* retry_message = ci_env.retry_message();
if (_compilation_log != NULL) {
_compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);