< prev index next >

src/hotspot/share/prims/jvmtiEnvBase.hpp

Print this page

        

*** 296,305 **** --- 296,308 ---- 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, jobject object, jvmtiMonitorUsage* info_ptr); + jvmtiError get_stack_trace(javaVFrame *jvf, + jint stack_depth, jint max_count, + jvmtiFrameInfo* frame_buffer, jint* count_ptr); jvmtiError get_stack_trace(JavaThread *java_thread, jint stack_depth, jint max_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr); jvmtiError get_current_contended_monitor(JavaThread *calling_thread, JavaThread *java_thread,
*** 561,571 **** 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: JvmtiEnv *_env; JavaThread* _java_thread; jint _depth; --- 564,574 ---- VMOp_Type type() const { return VMOp_GetFrameCount; } jvmtiError result() { return _result; } void doit(); }; ! // VM operation get to frame location at safepoint. class VM_GetFrameLocation : public VM_Operation { private: JvmtiEnv *_env; JavaThread* _java_thread; jint _depth;
*** 585,594 **** --- 588,690 ---- VMOp_Type type() const { return VMOp_GetFrameLocation; } jvmtiError result() { return _result; } void doit(); }; + // VM operation get to get fiber thread at safepoint. + class VM_GetFiberThread : public VM_Operation { + private: + JavaThread* _current_thread; + Handle _fiber_h; + jthread* _carrier_thread_ptr; + jvmtiError _result; + + public: + VM_GetFiberThread(JavaThread* current_thread, Handle fiber_h, jthread* carrier_thread_ptr) { + _current_thread = current_thread; + _fiber_h = fiber_h; + _carrier_thread_ptr = carrier_thread_ptr; + _result = JVMTI_ERROR_NONE; + } + VMOp_Type type() const { return VMOp_GetFiberThread; } + jvmtiError result() { return _result; } + void doit(); + }; + + // VM operation to get fiber stack trace at safepoint. + class VM_GetFiberStackTrace : public VM_Operation { + private: + JvmtiEnv *_env; + Handle _fiber_h; + jint _start_depth; + jint _max_count; + jvmtiFrameInfo *_frame_buffer; + jint *_count_ptr; + jvmtiError _result; + + public: + VM_GetFiberStackTrace(JvmtiEnv *env, Handle fiber_h, + jint start_depth, jint max_count, + jvmtiFrameInfo* frame_buffer, jint* count_ptr) { + _env = env; + _fiber_h = fiber_h; + _start_depth = start_depth; + _max_count = max_count; + _frame_buffer = frame_buffer; + _count_ptr = count_ptr; + _result = JVMTI_ERROR_NONE; + } + jvmtiError result() { return _result; } + VMOp_Type type() const { return VMOp_GetFiberStackTrace; } + void doit(); + }; + + // VM operation to count fiber stack frames at safepoint. + class VM_GetFiberFrameCount : public VM_Operation { + private: + JvmtiEnv *_env; + Handle _fiber_h; + jint *_count_ptr; + jvmtiError _result; + + public: + VM_GetFiberFrameCount(JvmtiEnv *env, Handle fiber_h, jint *count_ptr) { + _env = env; + _fiber_h = fiber_h; + _count_ptr = count_ptr; + _result = JVMTI_ERROR_NONE; + } + VMOp_Type type() const { return VMOp_GetFiberFrameCount; } + jvmtiError result() { return _result; } + void doit(); + }; + + // VM operation get to fiber frame location at safepoint. + class VM_GetFiberFrameLocation : public VM_Operation { + private: + JvmtiEnv *_env; + Handle _fiber_h; + jint _depth; + jmethodID* _method_ptr; + jlocation* _location_ptr; + jvmtiError _result; + + public: + VM_GetFiberFrameLocation(JvmtiEnv *env, Handle fiber_h, jint depth, + jmethodID* method_ptr, jlocation* location_ptr) { + _env = env; + _fiber_h = fiber_h; + _depth = depth; + _method_ptr = method_ptr; + _location_ptr = location_ptr; + _result = JVMTI_ERROR_NONE; + } + VMOp_Type type() const { return VMOp_GetFiberFrameLocation; } + jvmtiError result() { return _result; } + void doit(); + }; + // ResourceTracker // // ResourceTracker works a little like a ResourceMark. All allocates // using the resource tracker are recorded. If an allocate using the
< prev index next >