< prev index next >

src/hotspot/share/prims/jvmtiEnvBase.hpp

Print this page
rev 47862 : imported patch 10.07.open.rebase_20171110.dcubed

*** 278,290 **** // allocated into environment specific storage jobject * new_jobjectArray(int length, Handle *handles); jthread * new_jthreadArray(int length, Handle *handles); jthreadGroup * new_jthreadGroupArray(int length, Handle *handles); - // convert from JNIHandle to JavaThread * - JavaThread * get_JavaThread(jthread jni_thread); - // convert to a jni jclass from a non-null Klass* jclass get_jni_class_non_null(Klass* k); jint count_locked_objects(JavaThread *java_thread, Handle hobj); jvmtiError get_locked_objects_in_frame(JavaThread *calling_thread, --- 278,287 ----
*** 295,310 **** vframe* vframeFor(JavaThread* java_thread, jint depth); public: // get a field descriptor for the specified class and field static bool get_field_descriptor(Klass* k, jfieldID field, fieldDescriptor* fd); - // test for suspend - most (all?) of these should go away - static bool is_thread_fully_suspended(JavaThread *thread, - bool wait_for_suspend, - uint32_t *bits); - // JVMTI API helper functions which are called at safepoint or thread is suspended. jvmtiError get_frame_count(JvmtiThreadState *state, jint *count_ptr); jvmtiError get_frame_location(JavaThread* java_thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr); jvmtiError get_object_monitor_usage(JavaThread *calling_thread, --- 292,302 ----
*** 358,375 **** _state = state; _result = JVMTI_ERROR_NONE; } VMOp_Type type() const { return VMOp_UpdateForPopTopFrame; } jvmtiError result() { return _result; } ! void doit() { ! JavaThread* jt = _state->get_thread(); ! if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) { ! _state->update_for_pop_top_frame(); ! } else { ! _result = JVMTI_ERROR_THREAD_NOT_ALIVE; ! } ! } }; // VM operation to set frame pop. class VM_SetFramePop : public VM_Operation { private: --- 350,360 ---- _state = state; _result = JVMTI_ERROR_NONE; } VMOp_Type type() const { return VMOp_UpdateForPopTopFrame; } jvmtiError result() { return _result; } ! void doit(); }; // VM operation to set frame pop. class VM_SetFramePop : public VM_Operation { private:
*** 388,406 **** // Nested operation must be allowed for the VM_EnterInterpOnlyMode that is // called from the JvmtiEventControllerPrivate::recompute_thread_enabled. bool allow_nested_vm_operations() const { return true; } VMOp_Type type() const { return VMOp_SetFramePop; } jvmtiError result() { return _result; } ! void doit() { ! JavaThread* jt = _state->get_thread(); ! if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) { ! int frame_number = _state->count_frames() - _depth; ! _state->env_thread_state((JvmtiEnvBase*)_env)->set_frame_pop(frame_number); ! } else { ! _result = JVMTI_ERROR_THREAD_NOT_ALIVE; ! } ! } }; // VM operation to get monitor information with stack depth. class VM_GetOwnedMonitorInfo : public VM_Operation { --- 373,383 ---- // Nested operation must be allowed for the VM_EnterInterpOnlyMode that is // called from the JvmtiEventControllerPrivate::recompute_thread_enabled. bool allow_nested_vm_operations() const { return true; } VMOp_Type type() const { return VMOp_SetFramePop; } jvmtiError result() { return _result; } ! void doit(); }; // VM operation to get monitor information with stack depth. class VM_GetOwnedMonitorInfo : public VM_Operation {
*** 420,437 **** _java_thread = java_thread; _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. --- 397,407 ---- _java_thread = java_thread; _owned_monitors_list = owned_monitor_list; _result = JVMTI_ERROR_NONE; } VMOp_Type type() const { return VMOp_GetOwnedMonitorInfo; } ! void doit(); jvmtiError result() { return _result; } }; // VM operation to get object monitor usage.
*** 474,490 **** _java_thread = java_thread; _owned_monitor_ptr = mon_ptr; } VMOp_Type type() const { return VMOp_GetCurrentContendedMonitor; } jvmtiError result() { return _result; } ! 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_current_contended_monitor(_calling_thread,_java_thread,_owned_monitor_ptr); ! } ! } }; // VM operation to get stack trace at safepoint. class VM_GetStackTrace : public VM_Operation { private: --- 444,454 ---- _java_thread = java_thread; _owned_monitor_ptr = mon_ptr; } VMOp_Type type() const { return VMOp_GetCurrentContendedMonitor; } jvmtiError result() { return _result; } ! void doit(); }; // VM operation to get stack trace at safepoint. class VM_GetStackTrace : public VM_Operation { private:
*** 507,525 **** _frame_buffer = frame_buffer; _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; --- 471,481 ---- _frame_buffer = frame_buffer; _count_ptr = count_ptr; } jvmtiError result() { return _result; } VMOp_Type type() const { return VMOp_GetStackTrace; } ! void doit(); }; // forward declaration struct StackInfoNode;
*** 605,621 **** _state = state; _count_ptr = count_ptr; } VMOp_Type type() const { return VMOp_GetFrameCount; } jvmtiError result() { return _result; } ! void doit() { ! _result = JVMTI_ERROR_THREAD_NOT_ALIVE; ! JavaThread* jt = _state->get_thread(); ! if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) { ! _result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr); ! } ! } }; // VM operation to frame location at safepoint. class VM_GetFrameLocation : public VM_Operation { private: --- 561,571 ---- _state = state; _count_ptr = count_ptr; } VMOp_Type type() const { return VMOp_GetFrameCount; } jvmtiError result() { return _result; } ! void doit(); }; // VM operation to frame location at safepoint. class VM_GetFrameLocation : public VM_Operation { private:
*** 635,652 **** _method_ptr = method_ptr; _location_ptr = location_ptr; } VMOp_Type type() const { return VMOp_GetFrameLocation; } jvmtiError result() { return _result; } ! 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_frame_location(_java_thread, _depth, ! _method_ptr, _location_ptr); ! } ! } }; // ResourceTracker // --- 585,595 ---- _method_ptr = method_ptr; _location_ptr = location_ptr; } VMOp_Type type() const { return VMOp_GetFrameLocation; } jvmtiError result() { return _result; } ! void doit(); }; // ResourceTracker //
< prev index next >