8043125: compiler/types/correctness/CorrectnessTest.java: assert(layout->tag() == DataLayout::speculative_trap_data_tag) failed: wrong type
Reviewed-by: kvn
--- a/hotspot/src/share/vm/prims/whitebox.cpp Sun Nov 02 18:42:30 2014 +0300
+++ b/hotspot/src/share/vm/prims/whitebox.cpp Sun Nov 02 18:43:00 2014 +0300
@@ -509,16 +509,6 @@
static AlwaysFalseClosure always_false;
-class VM_WhiteBoxCleanMethodData : public VM_WhiteBoxOperation {
- public:
- VM_WhiteBoxCleanMethodData(MethodData* mdo) : _mdo(mdo) { }
- void doit() {
- _mdo->clean_method_data(&always_false);
- }
- private:
- MethodData* _mdo;
-};
-
WB_ENTRY(void, WB_ClearMethodState(JNIEnv* env, jobject o, jobject method))
jmethodID jmid = reflected_method_to_jmid(thread, env, method);
CHECK_JNI_EXCEPTION(env);
@@ -534,8 +524,8 @@
for (int i = 0; i < arg_count; i++) {
mdo->set_arg_modified(i, 0);
}
- VM_WhiteBoxCleanMethodData op(mdo);
- VMThread::execute(&op);
+ MutexLockerEx mu(mdo->extra_data_lock());
+ mdo->clean_method_data(&always_false);
}
mh->clear_not_c1_compilable();