Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalRuntime.cpp @ 10953:97e282186b5b
Add heap sanity checker with premature hard crash for debugging write barriers
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Fri, 02 Aug 2013 19:03:05 +0200 |
parents | 554f67e4ff3f |
children | 359f7e70ae7f 0991c12c4186 |
comparison
equal
deleted
inserted
replaced
10952:b43bc053ce8f | 10953:97e282186b5b |
---|---|
370 | 370 |
371 JRT_LEAF(void, GraalRuntime::write_barrier_post(JavaThread* thread, void* card_addr)) | 371 JRT_LEAF(void, GraalRuntime::write_barrier_post(JavaThread* thread, void* card_addr)) |
372 thread->dirty_card_queue().enqueue(card_addr); | 372 thread->dirty_card_queue().enqueue(card_addr); |
373 JRT_END | 373 JRT_END |
374 | 374 |
375 JRT_LEAF(jboolean, GraalRuntime::validate_object(JavaThread* thread,oopDesc* parent, oopDesc* child)) | |
376 bool ret = true; | |
377 if(!Universe::heap()->is_in_closed_subset(parent)) { | |
378 tty->print_cr("Parent Object "INTPTR_FORMAT" not in heap", parent); | |
379 parent->print(); | |
380 ret=false; | |
381 } | |
382 if(!Universe::heap()->is_in_closed_subset(child)) { | |
383 tty->print_cr("Child Object "INTPTR_FORMAT" not in heap", child); | |
384 child->print(); | |
385 ret=false; | |
386 } | |
387 return (jint)ret; | |
388 JRT_END | |
389 | |
375 JRT_ENTRY(void, GraalRuntime::vm_error(JavaThread* thread, oop where, oop format, jlong value)) | 390 JRT_ENTRY(void, GraalRuntime::vm_error(JavaThread* thread, oop where, oop format, jlong value)) |
376 ResourceMark rm; | 391 ResourceMark rm; |
377 assert(where == NULL || java_lang_String::is_instance(where), "must be"); | 392 assert(where == NULL || java_lang_String::is_instance(where), "must be"); |
378 const char *error_msg = where == NULL ? "<internal Graal error>" : java_lang_String::as_utf8_string(where); | 393 const char *error_msg = where == NULL ? "<internal Graal error>" : java_lang_String::as_utf8_string(where); |
379 char *detail_msg = NULL; | 394 char *detail_msg = NULL; |