Skip to content

8348228: Major performance regression in GetMethodDeclaringClass and other JVMTI Method functions #656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions hotspot/src/share/vm/oops/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions hotspot/src/share/vm/prims/jniCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down