Mercurial > hg > truffle
comparison src/gpu/ptx/vm/gpu_ptx.cpp @ 18043:f55f2d400797
Fix some format strings
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 20:34:55 +0200 |
parents | 063ec2920d21 |
children |
comparison
equal
deleted
inserted
replaced
18042:3498d73280c8 | 18043:f55f2d400797 |
---|---|
468 Thread* THREAD = _thread; | 468 Thread* THREAD = _thread; |
469 ResourceMark rm(THREAD); | 469 ResourceMark rm(THREAD); |
470 char* message = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, O_BUFLEN + 1); | 470 char* message = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, O_BUFLEN + 1); |
471 jio_snprintf(message, O_BUFLEN, "[CUDA] *** Error (status=%d): %s", status, action); | 471 jio_snprintf(message, O_BUFLEN, "[CUDA] *** Error (status=%d): %s", status, action); |
472 if (TraceGPUInteraction) { | 472 if (TraceGPUInteraction) { |
473 tty->print_cr(message); | 473 tty->print_raw_cr(message); |
474 } | 474 } |
475 if (!HAS_PENDING_EXCEPTION) { | 475 if (!HAS_PENDING_EXCEPTION) { |
476 SharedRuntime::throw_and_post_jvmti_exception(_thread, vmSymbols::java_lang_RuntimeException(), message); | 476 SharedRuntime::throw_and_post_jvmti_exception(_thread, vmSymbols::java_lang_RuntimeException(), message); |
477 } | 477 } |
478 return false; | 478 return false; |
639 void print_oop() { | 639 void print_oop() { |
640 oop obj = *((oop*) next(sizeof(oop))); | 640 oop obj = *((oop*) next(sizeof(oop))); |
641 if (obj != NULL) { | 641 if (obj != NULL) { |
642 char type[256]; | 642 char type[256]; |
643 obj->klass()->name()->as_C_string(type, 256); | 643 obj->klass()->name()->as_C_string(type, 256); |
644 _st->print("oop "PTR_FORMAT" (%s)", (address) obj, type); | 644 _st->print("oop "INTPTR_FORMAT" (%s)", p2i(obj), type); |
645 } else { | 645 } else { |
646 _st->print("oop null"); | 646 _st->print("oop null"); |
647 } | 647 } |
648 } | 648 } |
649 | 649 |
686 tty->print_cr("[CUDA] Error(%d) : Failed to destroy context", status); | 686 tty->print_cr("[CUDA] Error(%d) : Failed to destroy context", status); |
687 } | 687 } |
688 _device_context = NULL; | 688 _device_context = NULL; |
689 } else { | 689 } else { |
690 if (TraceGPUInteraction) { | 690 if (TraceGPUInteraction) { |
691 tty->print_cr("[CUDA] Destroyed context", status); | 691 tty->print_cr("[CUDA] Destroyed context"); |
692 } | 692 } |
693 } | 693 } |
694 } | 694 } |
695 | 695 |
696 GPU_END | 696 GPU_END |