src/share/vm/prims/jvmtiEnvBase.hpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 354,366 ****
_owned_monitors_list = owned_monitor_list;
_result = JVMTI_ERROR_NONE;
}
VMOp_Type type() const { return VMOp_GetOwnedMonitorInfo; }
void doit() {
! ((JvmtiEnvBase *)_env)->get_owned_monitors(_calling_thread, _java_thread,
_owned_monitors_list);
}
jvmtiError result() { return _result; }
};
// VM operation to get object monitor usage.
--- 354,369 ----
_owned_monitors_list = owned_monitor_list;
_result = JVMTI_ERROR_NONE;
}
VMOp_Type type() const { return VMOp_GetOwnedMonitorInfo; }
void doit() {
! _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
! if (Threads::includes(_java_thread) && !_java_thread->is_exiting() && _java_thread->threadObj() != NULL) {
! _result = ((JvmtiEnvBase *)_env)->get_owned_monitors(_calling_thread, _java_thread,
_owned_monitors_list);
}
+ }
jvmtiError result() { return _result; }
};
// VM operation to get object monitor usage.
*** 437,450 ****
--- 440,456 ----
_count_ptr = count_ptr;
}
jvmtiError result() { return _result; }
VMOp_Type type() const { return VMOp_GetStackTrace; }
void doit() {
+ _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
+ if (Threads::includes(_java_thread) && !_java_thread->is_exiting() && _java_thread->threadObj() != NULL) {
_result = ((JvmtiEnvBase *)_env)->get_stack_trace(_java_thread,
_start_depth, _max_count,
_frame_buffer, _count_ptr);
}
+ }
};
// forward declaration
struct StackInfoNode;