comparison src/share/vm/prims/jvmtiEnvBase.hpp @ 14381:402677ca28ed

8034249: need more workarounds for suspend equivalent condition issue Summary: Collect data at safepoint, do not rely on thread suspension Reviewed-by: dcubed, dholmes Contributed-by: serguei.spitsyn@oracle.com
author sspitsyn
date Tue, 18 Feb 2014 06:19:49 -0800
parents e4062d6c5f22
children 0d8d78c0329a 4ca6dc0799b6
comparison
equal deleted inserted replaced
14380:e6195383bcaf 14381:402677ca28ed
1 /* 1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
354 _owned_monitors_list = owned_monitor_list; 354 _owned_monitors_list = owned_monitor_list;
355 _result = JVMTI_ERROR_NONE; 355 _result = JVMTI_ERROR_NONE;
356 } 356 }
357 VMOp_Type type() const { return VMOp_GetOwnedMonitorInfo; } 357 VMOp_Type type() const { return VMOp_GetOwnedMonitorInfo; }
358 void doit() { 358 void doit() {
359 ((JvmtiEnvBase *)_env)->get_owned_monitors(_calling_thread, _java_thread, 359 _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
360 _owned_monitors_list); 360 if (Threads::includes(_java_thread) && !_java_thread->is_exiting()
361 && _java_thread->threadObj() != NULL) {
362 _result = ((JvmtiEnvBase *)_env)->get_owned_monitors(_calling_thread, _java_thread,
363 _owned_monitors_list);
364 }
361 } 365 }
362 jvmtiError result() { return _result; } 366 jvmtiError result() { return _result; }
363 }; 367 };
364 368
365 369
437 _count_ptr = count_ptr; 441 _count_ptr = count_ptr;
438 } 442 }
439 jvmtiError result() { return _result; } 443 jvmtiError result() { return _result; }
440 VMOp_Type type() const { return VMOp_GetStackTrace; } 444 VMOp_Type type() const { return VMOp_GetStackTrace; }
441 void doit() { 445 void doit() {
442 _result = ((JvmtiEnvBase *)_env)->get_stack_trace(_java_thread, 446 _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
443 _start_depth, _max_count, 447 if (Threads::includes(_java_thread) && !_java_thread->is_exiting()
444 _frame_buffer, _count_ptr); 448 && _java_thread->threadObj() != NULL) {
449 _result = ((JvmtiEnvBase *)_env)->get_stack_trace(_java_thread,
450 _start_depth, _max_count,
451 _frame_buffer, _count_ptr);
452 }
445 } 453 }
446 }; 454 };
447 455
448 // forward declaration 456 // forward declaration
449 struct StackInfoNode; 457 struct StackInfoNode;