hotspot/src/share/vm/prims/jvmtiExport.cpp
changeset 46727 6e4a84748e2c
parent 46701 f559541c0daa
child 46773 fb17cc9a6847
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp	Thu Jul 27 15:36:15 2017 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp	Thu Jul 27 18:06:41 2017 -0400
@@ -195,7 +195,7 @@
 
   jclass to_jclass(Klass* klass) { return (klass == NULL ? NULL : (jclass)to_jobject(klass->java_mirror())); }
 
-  jmethodID to_jmethodID(methodHandle method) { return method->jmethod_id(); }
+  jmethodID to_jmethodID(const methodHandle& method) { return method->jmethod_id(); }
 
   JNIEnv* jni_env() { return _jni_env; }
 };
@@ -229,7 +229,7 @@
   jmethodID _mid;
 
 public:
-  JvmtiMethodEventMark(JavaThread *thread, methodHandle method) :
+  JvmtiMethodEventMark(JavaThread *thread, const methodHandle& method) :
     JvmtiThreadEventMark(thread),
     _mid(to_jmethodID(method)) {};
   jmethodID jni_methodID() { return _mid; }
@@ -240,7 +240,7 @@
   jlocation _loc;
 
 public:
-  JvmtiLocationEventMark(JavaThread *thread, methodHandle method, address location) :
+  JvmtiLocationEventMark(JavaThread *thread, const methodHandle& method, address location) :
     JvmtiMethodEventMark(thread, method),
     _loc(location - method->code_base()) {};
   jlocation location() { return _loc; }
@@ -251,7 +251,7 @@
   jobject _exc;
 
 public:
-  JvmtiExceptionEventMark(JavaThread *thread, methodHandle method, address location, Handle exception) :
+  JvmtiExceptionEventMark(JavaThread *thread, const methodHandle& method, address location, Handle exception) :
     JvmtiLocationEventMark(thread, method, location),
     _exc(to_jobject(exception())) {};
   jobject exception() { return _exc; }