8248321: [JVMCI] improve libgraal logging and fatal error handling

Reviewed-by: kvn, never
This commit is contained in:
Doug Simon 2020-07-02 18:02:20 +02:00
parent 1356a0f1ac
commit 4e962f9675
14 changed files with 188 additions and 86 deletions

View file

@ -103,10 +103,10 @@ class JVMCITraceMark : public StackObj {
public:
JVMCITraceMark(const char* msg) {
_msg = msg;
TRACE_jvmci_2("Enter %s", _msg);
JVMCI_event_2("Enter %s", _msg);
}
~JVMCITraceMark() {
TRACE_jvmci_2(" Exit %s", _msg);
JVMCI_event_2(" Exit %s", _msg);
}
};
@ -1611,7 +1611,7 @@ C2V_VMENTRY_PREFIX(jint, writeDebugOutput, (JNIEnv* env, jobject, jbyteArray byt
if (thread == NULL) {
if (!ad._attached) {
// Can only use tty if the current thread is attached
TRACE_jvmci_1("Cannot write to tty on unattached thread");
JVMCI_event_1("Cannot write to tty on unattached thread");
return 0;
}
thread = get_current_thread();
@ -2382,7 +2382,7 @@ C2V_VMENTRY_PREFIX(jboolean, attachCurrentThread, (JNIEnv* env, jobject c2vm, jb
if (res == JNI_OK) {
guarantee(peerJNIEnv != NULL, "must be");
TRACE_jvmci_1("attached to JavaVM for JVMCI runtime %d", runtime->id());
JVMCI_event_1("attached to JavaVM for JVMCI runtime %d", runtime->id());
return true;
}
JVMCI_THROW_MSG_0(InternalError, err_msg("Error %d while attaching %s", res, attach_args.name));