8217445: [JVMCI] incorrect management of JVMCI compilation failure reason string

Reviewed-by: kvn, thartmann
This commit is contained in:
Doug Simon 2019-01-22 10:12:05 +01:00
parent b8ff3c4dd2
commit 5f5d4425c2
6 changed files with 32 additions and 9 deletions

View file

@ -104,9 +104,11 @@ class CompileTask : public CHeapObj<mtCompiler> {
int _hot_count; // information about its invocation counter
CompileReason _compile_reason; // more info about the task
const char* _failure_reason;
// Specifies if _failure_reason is on the C heap.
bool _failure_reason_on_C_heap;
public:
CompileTask() {
CompileTask() : _failure_reason(NULL), _failure_reason_on_C_heap(false) {
_lock = new Monitor(Mutex::nonleaf+2, "CompileTaskLock");
}
@ -199,8 +201,9 @@ public:
void log_task_start(CompileLog* log);
void log_task_done(CompileLog* log);
void set_failure_reason(const char* reason) {
void set_failure_reason(const char* reason, bool on_C_heap = false) {
_failure_reason = reason;
_failure_reason_on_C_heap = on_C_heap;
}
bool check_break_at_flags();