hg: valhalla/valhalla: Initial prototype of Lookup::defineClass to define a dynamic nestmate.

mandy.chung at oracle.com mandy.chung at oracle.com
Tue Oct 23 20:06:27 UTC 2018


Changeset: 55aafa38f559
Author:    mchung
Date:      2018-10-23 13:05 -0700
URL:       http://hg.openjdk.java.net/valhalla/valhalla/rev/55aafa38f559

Initial prototype of Lookup::defineClass to define a dynamic nestmate.
javac is updated not to generate the bridge method for lambda.
Also experiment to replace the use of Unsafe VM anonmyous class
and constant pool patching.  Unsafe::defineAnonymousClass supports
the following properties:

1. Hidden / non-findable / unregister class
   The class is not registered in the system dictionary
   Should a non-findable class forbid any reference to this_class?

2. Weak class
   The class has a different life cycle as its defining class loader.
   i.e. it may be reclaimed when the class loader is alive

3. Access to VM annotations
   VM annotations are internal.

4. Live constants
   Explore the class data idea to replace the constant pool patching
   mechanism.

! make/hotspot/symbols/symbols-unix
! src/hotspot/share/aot/aotCodeHeap.cpp
! src/hotspot/share/aot/aotLoader.cpp
! src/hotspot/share/ci/ciField.cpp
! src/hotspot/share/ci/ciInstanceKlass.cpp
! src/hotspot/share/ci/ciInstanceKlass.hpp
! src/hotspot/share/classfile/classFileParser.cpp
! src/hotspot/share/classfile/classFileParser.hpp
! src/hotspot/share/classfile/classLoader.cpp
! src/hotspot/share/classfile/classLoaderData.cpp
! src/hotspot/share/classfile/classLoaderData.hpp
! src/hotspot/share/classfile/classLoaderDataGraph.cpp
! src/hotspot/share/classfile/classLoaderDataGraph.hpp
! src/hotspot/share/classfile/classLoaderExt.cpp
! src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp
! src/hotspot/share/classfile/classLoaderStats.cpp
! src/hotspot/share/classfile/defaultMethods.cpp
! src/hotspot/share/classfile/javaClasses.hpp
! src/hotspot/share/classfile/klassFactory.cpp
! src/hotspot/share/classfile/klassFactory.hpp
! src/hotspot/share/classfile/moduleEntry.hpp
! src/hotspot/share/classfile/systemDictionary.cpp
! src/hotspot/share/classfile/systemDictionary.hpp
! src/hotspot/share/classfile/systemDictionaryShared.cpp
! src/hotspot/share/include/jvm.h
! src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
! src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp
! src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp
! src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp
! src/hotspot/share/jvmci/vmStructs_jvmci.cpp
! src/hotspot/share/memory/metaspace.cpp
! src/hotspot/share/memory/metaspace.hpp
! src/hotspot/share/memory/metaspace/printCLDMetaspaceInfoClosure.cpp
! src/hotspot/share/memory/metaspace/spaceManager.cpp
! src/hotspot/share/memory/metaspaceShared.cpp
! src/hotspot/share/memory/metaspaceTracer.cpp
! src/hotspot/share/oops/instanceKlass.cpp
! src/hotspot/share/oops/instanceKlass.hpp
! src/hotspot/share/oops/instanceMirrorKlass.inline.hpp
! src/hotspot/share/prims/jvm.cpp
! src/hotspot/share/prims/jvmtiRedefineClasses.cpp
! src/hotspot/share/prims/methodHandles.cpp
! src/hotspot/share/prims/unsafe.cpp
! src/hotspot/share/runtime/reflection.cpp
! src/hotspot/share/runtime/vmStructs.cpp
! src/java.base/share/classes/java/lang/Class.java
! src/java.base/share/classes/java/lang/ClassLoader.java
! src/java.base/share/classes/java/lang/System.java
! src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java
! src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
! src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
! src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java
! src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java
! src/java.base/share/classes/java/lang/invoke/MethodHandles.java
! src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java
! src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java
! src/java.base/share/native/libjava/ClassLoader.c
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
! test/hotspot/gtest/memory/test_metaspace_allocation.cpp
+ test/jdk/java/lang/invoke/defineClass/DefineClassTest.java
+ test/jdk/java/lang/invoke/defineClass/DefineClassWithClassData.java



More information about the valhalla-dev mailing list