threadService.cpp revision 875
0N/A# include "incls/_threadService.cpp.incl"
_thread_cpu_time_enabled = true;
if (daemon) {
if (daemon) {
return prev;
return prev;
bool found = false;
if (d == dump) {
found = true;
int num_threads,
TRAPS) {
klassOop k = SystemDictionary::resolve_or_fail(vmSymbolHandles::java_lang_StackTraceElement_array(), true, CHECK_NH);
// Construct an array of java/lang/StackTraceElement object
return result_obj;
bool blocked_on_monitor = false;
int num_deadlocks = 0;
if (concurrent_locks) {
if (concurrent_locks) {
oop threadObj = java_util_concurrent_locks_AbstractOwnableSynchronizer::get_owner_threadObj(waitingToLockBlocker);
if (concurrent_locks) {
return deadlocks;
ThreadDumpResult::ThreadDumpResult() : _num_threads(0), _num_snapshots(0), _snapshots(NULL), _next(NULL), _last(NULL) {
ThreadDumpResult::ThreadDumpResult(int num_threads) : _num_threads(num_threads), _num_snapshots(0), _snapshots(NULL), _next(NULL), _last(NULL) {
if (with_lock_info) {
if (length > 0) {
for (int i = 0; i < length; i++) {
for (int i = 0; i < length; i++) {
for (int i = 0; i < len; i++) {
_thread = t;
_thread = t;
_depth = 0;
if (_with_locked_monitors) {
delete _frames;
delete _jni_locked_monitors;
int count = 0;
if (f->is_java_frame()) {
count++;
if (_with_locked_monitors) {
bool found = false;
for (int j = 0; j < len; j++) {
found = true;
return found;
// Allocate an array of java/lang/StackTraceElement object
for (int j = 0; j < _depth; j++) {
return backtrace;
_depth++;
for (int i = 0; i < length; i++) {
for (int j = 0; j < length; j++) {
if (_retain_map_on_free) {
t = t->next();
delete tcl;
HeapInspection::find_instances_at_safepoint(SystemDictionary::abstract_ownable_synchronizer_klass(),
for (int i = 0; i < length; i++) {
oop owner_thread_obj = java_util_concurrent_locks_AbstractOwnableSynchronizer::get_owner_threadObj(o);
return tcl;
return NULL;
delete _owned_locks;
for (int i = 0; i < length; i++) {
_monitor_wait_count = 0;
_sleep_count = 0;
_count_pending_reset = false;
_timer_pending_reset = false;
if (_blocker_object != NULL && _blocker_object->is_a(SystemDictionary::abstract_ownable_synchronizer_klass())) {
_blocker_object_owner = java_util_concurrent_locks_AbstractOwnableSynchronizer::get_owner_threadObj(_blocker_object);
delete _stack_trace;
delete _concurrent_locks;
_is_deadlock = false;
delete _threads;
for (int i = 0; i < len; i++) {
oop ownerObj = java_util_concurrent_locks_AbstractOwnableSynchronizer::get_owner_threadObj(waitingToLockBlocker);
JavaMonitorsInStackTrace = true;
for (int j = 0; j < len; j++) {
bool include_jni_attaching_threads) {