mirror of
https://github.com/openjdk/jdk8u.git
synced 2025-12-10 00:09:35 -06:00
8185348: Major performance regression in GetMethodDeclaringClass and other JVMTI Method functions
Reviewed-by: phh
This commit is contained in:
parent
16949879ae
commit
8234312bb0
@ -1903,9 +1903,6 @@ bool Method::is_method_id(jmethodID mid) {
|
||||
|
||||
Method* Method::checked_resolve_jmethod_id(jmethodID mid) {
|
||||
if (mid == NULL) return NULL;
|
||||
if (!Method::is_method_id(mid)) {
|
||||
return NULL;
|
||||
}
|
||||
Method* o = resolve_jmethod_id(mid);
|
||||
if (o == NULL || o == JNIMethodBlock::_free_method || !((Metadata*)o)->is_method()) {
|
||||
return NULL;
|
||||
|
||||
@ -468,6 +468,11 @@ Method* jniCheck::validate_jmethod_id(JavaThread* thr, jmethodID method_id) {
|
||||
if (moop == NULL) {
|
||||
ReportJNIFatalError(thr, fatal_wrong_class_or_method);
|
||||
}
|
||||
// jmethodIDs are supposed to be weak handles in the class loader data,
|
||||
// but that can be expensive so check it last
|
||||
else if (!Method::is_method_id(method_id)) {
|
||||
ReportJNIFatalError(thr, fatal_non_weak_method);
|
||||
}
|
||||
return moop;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user