Mercurial > hg > truffle
comparison src/share/vm/runtime/thread.cpp @ 6769:c088e2e95e69
Merge
author | zgu |
---|---|
date | Mon, 17 Sep 2012 13:34:07 -0700 |
parents | 716e6ef4482a a7509aff1b06 |
children | c3e799c37717 fb19af007ffc |
comparison
equal
deleted
inserted
replaced
6768:716e6ef4482a | 6769:c088e2e95e69 |
---|---|
840 } | 840 } |
841 | 841 |
842 void Thread::print_on(outputStream* st) const { | 842 void Thread::print_on(outputStream* st) const { |
843 // get_priority assumes osthread initialized | 843 // get_priority assumes osthread initialized |
844 if (osthread() != NULL) { | 844 if (osthread() != NULL) { |
845 st->print("prio=%d tid=" INTPTR_FORMAT " ", get_priority(this), this); | 845 int os_prio; |
846 if (os::get_native_priority(this, &os_prio) == OS_OK) { | |
847 st->print("os_prio=%d ", os_prio); | |
848 } | |
849 st->print("tid=" INTPTR_FORMAT " ", this); | |
846 osthread()->print_on(st); | 850 osthread()->print_on(st); |
847 } | 851 } |
848 debug_only(if (WizardMode) print_owned_locks_on(st);) | 852 debug_only(if (WizardMode) print_owned_locks_on(st);) |
849 } | 853 } |
850 | 854 |
2747 | 2751 |
2748 // Called by Threads::print() for VM_PrintThreads operation | 2752 // Called by Threads::print() for VM_PrintThreads operation |
2749 void JavaThread::print_on(outputStream *st) const { | 2753 void JavaThread::print_on(outputStream *st) const { |
2750 st->print("\"%s\" ", get_thread_name()); | 2754 st->print("\"%s\" ", get_thread_name()); |
2751 oop thread_oop = threadObj(); | 2755 oop thread_oop = threadObj(); |
2752 if (thread_oop != NULL && java_lang_Thread::is_daemon(thread_oop)) st->print("daemon "); | 2756 if (thread_oop != NULL) { |
2757 st->print("#" INT64_FORMAT " ", java_lang_Thread::thread_id(thread_oop)); | |
2758 if (java_lang_Thread::is_daemon(thread_oop)) st->print("daemon "); | |
2759 st->print("prio=%d ", java_lang_Thread::priority(thread_oop)); | |
2760 } | |
2753 Thread::print_on(st); | 2761 Thread::print_on(st); |
2754 // print guess for valid stack memory region (assume 4K pages); helps lock debugging | 2762 // print guess for valid stack memory region (assume 4K pages); helps lock debugging |
2755 st->print_cr("[" INTPTR_FORMAT "]", (intptr_t)last_Java_sp() & ~right_n_bits(12)); | 2763 st->print_cr("[" INTPTR_FORMAT "]", (intptr_t)last_Java_sp() & ~right_n_bits(12)); |
2756 if (thread_oop != NULL && JDK_Version::is_gte_jdk15x_version()) { | 2764 if (thread_oop != NULL && JDK_Version::is_gte_jdk15x_version()) { |
2757 st->print_cr(" java.lang.Thread.State: %s", java_lang_Thread::thread_status_name(thread_oop)); | 2765 st->print_cr(" java.lang.Thread.State: %s", java_lang_Thread::thread_status_name(thread_oop)); |
4274 | 4282 |
4275 VMThread::vm_thread()->print_on(st); | 4283 VMThread::vm_thread()->print_on(st); |
4276 st->cr(); | 4284 st->cr(); |
4277 Universe::heap()->print_gc_threads_on(st); | 4285 Universe::heap()->print_gc_threads_on(st); |
4278 WatcherThread* wt = WatcherThread::watcher_thread(); | 4286 WatcherThread* wt = WatcherThread::watcher_thread(); |
4279 if (wt != NULL) wt->print_on(st); | 4287 if (wt != NULL) { |
4280 st->cr(); | 4288 wt->print_on(st); |
4289 st->cr(); | |
4290 } | |
4281 CompileBroker::print_compiler_threads_on(st); | 4291 CompileBroker::print_compiler_threads_on(st); |
4282 st->flush(); | 4292 st->flush(); |
4283 } | 4293 } |
4284 | 4294 |
4285 // Threads::print_on_error() is called by fatal error handler. It's possible | 4295 // Threads::print_on_error() is called by fatal error handler. It's possible |