--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp Fri Aug 31 16:39:35 2012 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp Sat Sep 01 13:25:18 2012 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, 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
@@ -196,7 +196,7 @@
jobject to_jobject(oop obj) { return JNIHandles::make_local(_thread,obj); }
#endif
- jclass to_jclass(klassOop klass) { return (klass == NULL ? NULL : (jclass)to_jobject(Klass::cast(klass)->java_mirror())); }
+ jclass to_jclass(Klass* klass) { return (klass == NULL ? NULL : (jclass)to_jobject(Klass::cast(klass)->java_mirror())); }
jmethodID to_jmethodID(methodHandle method) { return method->jmethod_id(); }
@@ -220,7 +220,7 @@
jclass _jc;
public:
- JvmtiClassEventMark(JavaThread *thread, klassOop klass) :
+ JvmtiClassEventMark(JavaThread *thread, Klass* klass) :
JvmtiThreadEventMark(thread) {
_jc = to_jclass(klass);
};
@@ -678,13 +678,13 @@
#ifndef JVMTI_KERNEL
-static inline klassOop oop_to_klassOop(oop obj) {
- klassOop k = obj->klass();
+static inline Klass* oop_to_klass(oop obj) {
+ Klass* k = obj->klass();
// if the object is a java.lang.Class then return the java mirror
if (k == SystemDictionary::Class_klass()) {
if (!java_lang_Class::is_primitive(obj)) {
- k = java_lang_Class::as_klassOop(obj);
+ k = java_lang_Class::as_Klass(obj);
assert(k != NULL, "class for non-primitive mirror must exist");
}
}
@@ -696,7 +696,7 @@
jobject _jobj;
jlong _size;
public:
- JvmtiVMObjectAllocEventMark(JavaThread *thread, oop obj) : JvmtiClassEventMark(thread, oop_to_klassOop(obj)) {
+ JvmtiVMObjectAllocEventMark(JavaThread *thread, oop obj) : JvmtiClassEventMark(thread, oop_to_klass(obj)) {
_jobj = (jobject)to_jobject(obj);
_size = obj->size() * wordSize;
};
@@ -781,7 +781,7 @@
// JvmtiExport
//
-void JvmtiExport::post_raw_breakpoint(JavaThread *thread, methodOop method, address location) {
+void JvmtiExport::post_raw_breakpoint(JavaThread *thread, Method* method, address location) {
HandleMark hm(thread);
methodHandle mh(thread, method);
@@ -862,7 +862,7 @@
//
// JVMTI single step management
//
-void JvmtiExport::at_single_stepping_point(JavaThread *thread, methodOop method, address location) {
+void JvmtiExport::at_single_stepping_point(JavaThread *thread, Method* method, address location) {
assert(JvmtiExport::should_post_single_step(), "must be single stepping");
HandleMark hm(thread);
@@ -905,7 +905,7 @@
}
}
-void JvmtiExport::post_class_load(JavaThread *thread, klassOop klass) {
+void JvmtiExport::post_class_load(JavaThread *thread, Klass* klass) {
HandleMark hm(thread);
KlassHandle kh(thread, klass);
@@ -934,7 +934,7 @@
}
-void JvmtiExport::post_class_prepare(JavaThread *thread, klassOop klass) {
+void JvmtiExport::post_class_prepare(JavaThread *thread, Klass* klass) {
HandleMark hm(thread);
KlassHandle kh(thread, klass);
@@ -962,7 +962,7 @@
}
}
-void JvmtiExport::post_class_unload(klassOop klass) {
+void JvmtiExport::post_class_unload(Klass* klass) {
Thread *thread = Thread::current();
HandleMark hm(thread);
KlassHandle kh(thread, klass);
@@ -1103,7 +1103,7 @@
}
}
-void JvmtiExport::post_method_entry(JavaThread *thread, methodOop method, frame current_frame) {
+void JvmtiExport::post_method_entry(JavaThread *thread, Method* method, frame current_frame) {
HandleMark hm(thread);
methodHandle mh(thread, method);
@@ -1141,7 +1141,7 @@
}
}
-void JvmtiExport::post_method_exit(JavaThread *thread, methodOop method, frame current_frame) {
+void JvmtiExport::post_method_exit(JavaThread *thread, Method* method, frame current_frame) {
HandleMark hm(thread);
methodHandle mh(thread, method);
@@ -1236,7 +1236,7 @@
// Todo: inline this for optimization
-void JvmtiExport::post_single_step(JavaThread *thread, methodOop method, address location) {
+void JvmtiExport::post_single_step(JavaThread *thread, Method* method, address location) {
HandleMark hm(thread);
methodHandle mh(thread, method);
@@ -1269,7 +1269,7 @@
}
-void JvmtiExport::post_exception_throw(JavaThread *thread, methodOop method, address location, oop exception) {
+void JvmtiExport::post_exception_throw(JavaThread *thread, Method* method, address location, oop exception) {
HandleMark hm(thread);
methodHandle mh(thread, method);
Handle exception_handle(thread, exception);
@@ -1304,7 +1304,7 @@
bool should_repeat;
vframeStream st(thread);
assert(!st.at_end(), "cannot be at end");
- methodOop current_method = NULL;
+ Method* current_method = NULL;
int current_bci = -1;
do {
current_method = st.method();
@@ -1315,7 +1315,7 @@
current_bci = current_method->fast_exception_handler_bci_for(
eh_klass, current_bci, THREAD);
if (HAS_PENDING_EXCEPTION) {
- exception_handle = KlassHandle(thread, PENDING_EXCEPTION);
+ exception_handle = Handle(thread, PENDING_EXCEPTION);
CLEAR_PENDING_EXCEPTION;
should_repeat = true;
}
@@ -1349,7 +1349,7 @@
}
-void JvmtiExport::notice_unwind_due_to_exception(JavaThread *thread, methodOop method, address location, oop exception, bool in_handler_frame) {
+void JvmtiExport::notice_unwind_due_to_exception(JavaThread *thread, Method* method, address location, oop exception, bool in_handler_frame) {
HandleMark hm(thread);
methodHandle mh(thread, method);
Handle exception_handle(thread, exception);
@@ -1416,7 +1416,7 @@
}
oop JvmtiExport::jni_GetField_probe(JavaThread *thread, jobject jobj, oop obj,
- klassOop klass, jfieldID fieldID, bool is_static) {
+ Klass* klass, jfieldID fieldID, bool is_static) {
if (*((int *)get_field_access_count_addr()) > 0 && thread->has_last_Java_frame()) {
// At least one field access watch is set so we have more work
// to do. This wrapper is used by entry points that allow us
@@ -1429,7 +1429,7 @@
}
oop JvmtiExport::jni_GetField_probe_nh(JavaThread *thread, jobject jobj, oop obj,
- klassOop klass, jfieldID fieldID, bool is_static) {
+ Klass* klass, jfieldID fieldID, bool is_static) {
if (*((int *)get_field_access_count_addr()) > 0 && thread->has_last_Java_frame()) {
// At least one field access watch is set so we have more work
// to do. This wrapper is used by "quick" entry points that don't
@@ -1444,7 +1444,7 @@
}
void JvmtiExport::post_field_access_by_jni(JavaThread *thread, oop obj,
- klassOop klass, jfieldID fieldID, bool is_static) {
+ Klass* klass, jfieldID fieldID, bool is_static) {
// We must be called with a Java context in order to provide reasonable
// values for the klazz, method, and location fields. The callers of this
// function don't make the call unless there is a Java context.
@@ -1473,7 +1473,7 @@
h_klass, h_obj, fieldID);
}
-void JvmtiExport::post_field_access(JavaThread *thread, methodOop method,
+void JvmtiExport::post_field_access(JavaThread *thread, Method* method,
address location, KlassHandle field_klass, Handle object, jfieldID field) {
HandleMark hm(thread);
@@ -1510,7 +1510,7 @@
}
oop JvmtiExport::jni_SetField_probe(JavaThread *thread, jobject jobj, oop obj,
- klassOop klass, jfieldID fieldID, bool is_static,
+ Klass* klass, jfieldID fieldID, bool is_static,
char sig_type, jvalue *value) {
if (*((int *)get_field_modification_count_addr()) > 0 && thread->has_last_Java_frame()) {
// At least one field modification watch is set so we have more work
@@ -1524,7 +1524,7 @@
}
oop JvmtiExport::jni_SetField_probe_nh(JavaThread *thread, jobject jobj, oop obj,
- klassOop klass, jfieldID fieldID, bool is_static,
+ Klass* klass, jfieldID fieldID, bool is_static,
char sig_type, jvalue *value) {
if (*((int *)get_field_modification_count_addr()) > 0 && thread->has_last_Java_frame()) {
// At least one field modification watch is set so we have more work
@@ -1540,7 +1540,7 @@
}
void JvmtiExport::post_field_modification_by_jni(JavaThread *thread, oop obj,
- klassOop klass, jfieldID fieldID, bool is_static,
+ Klass* klass, jfieldID fieldID, bool is_static,
char sig_type, jvalue *value) {
// We must be called with a Java context in order to provide reasonable
// values for the klazz, method, and location fields. The callers of this
@@ -1571,7 +1571,7 @@
h_klass, h_obj, fieldID, sig_type, value);
}
-void JvmtiExport::post_raw_field_modification(JavaThread *thread, methodOop method,
+void JvmtiExport::post_raw_field_modification(JavaThread *thread, Method* method,
address location, KlassHandle field_klass, Handle object, jfieldID field,
char sig_type, jvalue *value) {
@@ -1629,7 +1629,7 @@
}
}
-void JvmtiExport::post_field_modification(JavaThread *thread, methodOop method,
+void JvmtiExport::post_field_modification(JavaThread *thread, Method* method,
address location, KlassHandle field_klass, Handle object, jfieldID field,
char sig_type, jvalue *value_ptr) {
@@ -1669,7 +1669,7 @@
}
}
-void JvmtiExport::post_native_method_bind(methodOop method, address* function_ptr) {
+void JvmtiExport::post_native_method_bind(Method* method, address* function_ptr) {
JavaThread* thread = JavaThread::current();
assert(thread->thread_state() == _thread_in_vm, "must be in vm state");
@@ -1730,7 +1730,7 @@
int stackframe = 0;
for(ScopeDesc* sd = nm->scope_desc_at(p->real_pc(nm));sd != NULL;sd = sd->sender()) {
// sd->method() can be NULL for stubs but not for nmethods. To be completely robust, include an assert that we should never see a null sd->method()
- assert(!sd->method().is_null(), "sd->method() cannot be null.");
+ assert(sd->method() != NULL, "sd->method() cannot be null.");
record->pcinfo[scope].methods[stackframe] = sd->method()->jmethod_id();
record->pcinfo[scope].bcis[stackframe] = sd->bci();
stackframe++;
@@ -2121,7 +2121,7 @@
if (env->is_enabled(JVMTI_EVENT_VM_OBJECT_ALLOC)) {
EVT_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("JVMTI [%s] Evt vmobject alloc sent %s",
JvmtiTrace::safe_get_thread_name(thread),
- object==NULL? "NULL" : Klass::cast(java_lang_Class::as_klassOop(object))->external_name()));
+ object==NULL? "NULL" : Klass::cast(java_lang_Class::as_Klass(object))->external_name()));
JvmtiVMObjectAllocEventMark jem(thread, h());
JvmtiJavaThreadEventTransition jet(thread);