< prev index next >
src/hotspot/share/prims/jvmtiEnvBase.hpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2019, 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, 2020, 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.
*** 299,312 ****
jvmtiError get_object_monitor_usage(JavaThread *calling_thread,
jobject object, jvmtiMonitorUsage* info_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,
jobject *monitor_ptr);
! jvmtiError get_owned_monitors(JavaThread *calling_thread, JavaThread* java_thread,
GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list);
jvmtiError check_top_frame(JavaThread* current_thread, JavaThread* java_thread,
jvalue value, TosState tos, Handle* ret_ob_h);
jvmtiError force_early_return(JavaThread* java_thread, jvalue value, TosState tos);
};
--- 299,311 ----
jvmtiError get_object_monitor_usage(JavaThread *calling_thread,
jobject object, jvmtiMonitorUsage* info_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 *java_thread,
jobject *monitor_ptr);
! jvmtiError get_owned_monitors(JavaThread* java_thread,
GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list);
jvmtiError check_top_frame(JavaThread* current_thread, JavaThread* java_thread,
jvalue value, TosState tos, Handle* ret_ob_h);
jvmtiError force_early_return(JavaThread* java_thread, jvalue value, TosState tos);
};
*** 374,404 ****
jvmtiError result() { return _result; }
void doit();
};
! // VM operation to get monitor information with stack depth.
! class VM_GetOwnedMonitorInfo : public VM_Operation {
private:
JvmtiEnv *_env;
- JavaThread* _calling_thread;
- JavaThread *_java_thread;
jvmtiError _result;
GrowableArray<jvmtiMonitorStackDepthInfo*> *_owned_monitors_list;
public:
! VM_GetOwnedMonitorInfo(JvmtiEnv* env, JavaThread* calling_thread,
! JavaThread* java_thread,
! GrowableArray<jvmtiMonitorStackDepthInfo*>* owned_monitor_list) {
! _env = env;
! _calling_thread = calling_thread;
! _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.
--- 373,395 ----
jvmtiError result() { return _result; }
void doit();
};
! // HandshakeClosure to get monitor information with stack depth.
! class GetOwnedMonitorInfoClosure : public HandshakeClosure {
private:
JvmtiEnv *_env;
jvmtiError _result;
GrowableArray<jvmtiMonitorStackDepthInfo*> *_owned_monitors_list;
public:
! GetOwnedMonitorInfoClosure(JvmtiEnv* env,
! GrowableArray<jvmtiMonitorStackDepthInfo*>* owned_monitor_list)
! : HandshakeClosure("GetOwnedMonitorInfo"),
! _env(env), _result(JVMTI_ERROR_NONE), _owned_monitors_list(owned_monitor_list) {}
! void do_thread(Thread *target);
jvmtiError result() { return _result; }
};
// VM operation to get object monitor usage.
*** 423,451 ****
_result = ((JvmtiEnvBase*) _env)->get_object_monitor_usage(_calling_thread, _object, _info_ptr);
}
};
! // VM operation to get current contended monitor.
! class VM_GetCurrentContendedMonitor : public VM_Operation {
private:
JvmtiEnv *_env;
- JavaThread *_calling_thread;
- JavaThread *_java_thread;
jobject *_owned_monitor_ptr;
jvmtiError _result;
public:
! VM_GetCurrentContendedMonitor(JvmtiEnv *env, JavaThread *calling_thread, JavaThread *java_thread, jobject *mon_ptr) {
! _env = env;
! _calling_thread = calling_thread;
! _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:
--- 414,437 ----
_result = ((JvmtiEnvBase*) _env)->get_object_monitor_usage(_calling_thread, _object, _info_ptr);
}
};
! // HandshakeClosure to get current contended monitor.
! class GetCurrentContendedMonitorClosure : public HandshakeClosure {
private:
JvmtiEnv *_env;
jobject *_owned_monitor_ptr;
jvmtiError _result;
public:
! GetCurrentContendedMonitorClosure(JvmtiEnv *env, jobject *mon_ptr)
! : HandshakeClosure("GetCurrentContendedMonitor"),
! _env(env), _owned_monitor_ptr(mon_ptr),
! _result(JVMTI_ERROR_THREAD_NOT_ALIVE) {}
jvmtiError result() { return _result; }
! void do_thread(Thread *target);
};
// VM operation to get stack trace at safepoint.
class VM_GetStackTrace : public VM_Operation {
private:
< prev index next >