Mercurial > hg > truffle
diff src/share/vm/graal/graalCompilerToVM.cpp @ 16405:9bfc4247262f
send log output to native tty
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Fri, 04 Jul 2014 16:06:44 +0200 |
parents | 5f01f7c48d40 |
children | 8853b9304083 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp Fri Jul 04 13:47:37 2014 +0200 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Fri Jul 04 16:06:44 2014 +0200 @@ -997,6 +997,14 @@ } C2V_END +C2V_VMENTRY(void, writeDebugOutput, (JNIEnv*, jobject, jbyteArray bytes, jint offset, jint length)) + while (length > 0) { + jbyte* start = ((typeArrayOop) JNIHandles::resolve(bytes))->byte_at_addr(offset); + tty->write((char*) start, MIN2(length, O_BUFLEN)); + length -= O_BUFLEN; + offset += O_BUFLEN; + } +C2V_END #define CC (char*) /*cast a literal from (const char*)*/ @@ -1077,6 +1085,7 @@ {CC"getNextStackFrame", CC"("HS_STACK_FRAME_REF "[JI)"HS_STACK_FRAME_REF, FN_PTR(getNextStackFrame)}, {CC"materializeVirtualObjects", CC"("HS_STACK_FRAME_REF"Z)V", FN_PTR(materializeVirtualObjects)}, {CC"shouldDebugNonSafepoints", CC"()Z", FN_PTR(shouldDebugNonSafepoints)}, + {CC"writeDebugOutput", CC"([BII)V", FN_PTR(writeDebugOutput)}, }; int CompilerToVM_methods_count() {