ResolvedMethodName::vmholder unused?

Ioi Lam ioi.lam at oracle.com
Tue May 8 00:29:01 UTC 2018


I don't see anywhere in HotSpot that uses 
java_lang_invoke_ResolvedMethodName::_vmholder_offset, which is declared 
here:

http://hg.openjdk.java.net/jdk/jdk/file/7444101401b2/src/hotspot/share/classfile/javaClasses.hpp#l1057
http://hg.openjdk.java.net/jdk/jdk/file/9608f7f41c4e/src/java.base/share/classes/java/lang/invoke/MemberName.java#l75

I tried commenting out the initialization of this field and was able to 
run a simple Lambda test.

diff -r 9255cb73f048 src/hotspot/share/classfile/javaClasses.cpp
--- a/src/hotspot/share/classfile/javaClasses.cpp    Mon May 07 15:29:31 
2018 -0700
+++ b/src/hotspot/share/classfile/javaClasses.cpp    Mon May 07 17:27:27 
2018 -0700
@@ -3808,7 +3808,7 @@
      // Add a reference to the loader (actually mirror because 
anonymous classes will not have
      // distinct loaders) to ensure the metadata is kept alive.
      // This mirror may be different than the one in clazz field.
-    new_resolved_method->obj_field_put(_vmholder_offset, 
m->method_holder()->java_mirror());
+    //new_resolved_method->obj_field_put(_vmholder_offset, 
m->method_holder()->java_mirror());
      resolved_method = ResolvedMethodTable::add_method(Handle(THREAD, 
new_resolved_method));
    }


Any plans to use vmholder in the future? Or, is this used by any 
non-HotSpot VM?

If no one uses it, I'll file an RFE to remove it, so we can save a 
pointer per MemberName.

Thanks
- Ioi





More information about the mlvm-dev mailing list