comparison src/share/vm/prims/forte.cpp @ 4137:04b9a2566eec

Merge with hsx23/hotspot.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 17 Dec 2011 21:40:27 +0100
parents f08d439fab8c
children da91efe96a93
comparison
equal deleted inserted replaced
3737:9dc19b7d89a3 4137:04b9a2566eec
520 // method_id - jmethodID of the method being executed 520 // method_id - jmethodID of the method being executed
521 521
522 extern "C" { 522 extern "C" {
523 JNIEXPORT 523 JNIEXPORT
524 void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) { 524 void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
525
526 // This is if'd out because we no longer use thread suspension.
527 // However if someone wanted to backport this to a 5.0 jvm then this
528 // code would be important.
529 #if 0
530 if (SafepointSynchronize::is_synchronizing()) {
531 // The safepoint mechanism is trying to synchronize all the threads.
532 // Since this can involve thread suspension, it is not safe for us
533 // to be here. We can reduce the deadlock risk window by quickly
534 // returning to the SIGPROF handler. However, it is still possible
535 // for VMThread to catch us here or in the SIGPROF handler. If we
536 // are suspended while holding a resource and another thread blocks
537 // on that resource in the SIGPROF handler, then we will have a
538 // three-thread deadlock (VMThread, this thread, the other thread).
539 trace->num_frames = ticks_safepoint; // -10
540 return;
541 }
542 #endif
543
544 JavaThread* thread; 525 JavaThread* thread;
545 526
546 if (trace->env_id == NULL || 527 if (trace->env_id == NULL ||
547 (thread = JavaThread::thread_from_jni_environment(trace->env_id)) == NULL || 528 (thread = JavaThread::thread_from_jni_environment(trace->env_id)) == NULL ||
548 thread->is_exiting()) { 529 thread->is_exiting()) {
638 // information, please see the libcollect man page. 619 // information, please see the libcollect man page.
639 620
640 // Method to let libcollector know about a dynamically loaded function. 621 // Method to let libcollector know about a dynamically loaded function.
641 // Because it is weakly bound, the calls become NOP's when the library 622 // Because it is weakly bound, the calls become NOP's when the library
642 // isn't present. 623 // isn't present.
624 #ifdef __APPLE__
625 // XXXDARWIN: Link errors occur even when __attribute__((weak_import))
626 // is added
627 #define collector_func_load(x0,x1,x2,x3,x4,x5,x6) (0)
628 #else
643 void collector_func_load(char* name, 629 void collector_func_load(char* name,
644 void* null_argument_1, 630 void* null_argument_1,
645 void* null_argument_2, 631 void* null_argument_2,
646 void *vaddr, 632 void *vaddr,
647 int size, 633 int size,
648 int zero_argument, 634 int zero_argument,
649 void* null_argument_3); 635 void* null_argument_3);
650 #pragma weak collector_func_load 636 #pragma weak collector_func_load
651 #define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \ 637 #define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \
652 ( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),0 : 0 ) 638 ( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),0 : 0 )
639 #endif // __APPLE__
653 #endif // !_WINDOWS 640 #endif // !_WINDOWS
654 641
655 } // end extern "C" 642 } // end extern "C"
656 #endif // !IA64 643 #endif // !IA64
657 644