src/share/vm/prims/jvmtiEnvBase.hpp

changeset 8714
96a7391e620a
parent 6198
55fb97c4c58d
child 8856
ac27a9c85bea
child 9733
c61a86859323
equal deleted inserted replaced
8713:8dfbb002197a 8714:96a7391e620a
1 /* 1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2017, 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;

mercurial