6714758: hotspot: provide an entry point to the BootStrap Class loader[dholmes,acorn]

Tue, 17 Jun 2008 13:08:15 -0700

author
ksrini
date
Tue, 17 Jun 2008 13:08:15 -0700
changeset 661
d5ba4f8aa38a
parent 634
f139919897d2
child 662
8d852b81e775

6714758: hotspot: provide an entry point to the BootStrap Class loader[dholmes,acorn]
Summary: adds JVM_FindClassFromBootLoader entry point, for jdk's use
Reviewed-by: dholmes, acorn

make/linux/makefiles/mapfile-vers-debug file | annotate | diff | comparison | revisions
make/linux/makefiles/mapfile-vers-product file | annotate | diff | comparison | revisions
make/solaris/makefiles/mapfile-vers file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_COMPILER1_i486 file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_COMPILER1_sparc file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_COMPILER2_amd64 file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_COMPILER2_i486 file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_COMPILER2_sparc file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_COMPILER2_sparcv9 file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_TIERED_amd64 file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_TIERED_i486 file | annotate | diff | comparison | revisions
make/solaris/makefiles/reorder_TIERED_sparc file | annotate | diff | comparison | revisions
make/windows/makefiles/vm.make file | annotate | diff | comparison | revisions
src/share/vm/prims/jvm.cpp file | annotate | diff | comparison | revisions
src/share/vm/prims/jvm.h file | annotate | diff | comparison | revisions
     1.1 --- a/make/linux/makefiles/mapfile-vers-debug	Tue Jun 17 09:59:59 2008 -0700
     1.2 +++ b/make/linux/makefiles/mapfile-vers-debug	Tue Jun 17 13:08:15 2008 -0700
     1.3 @@ -89,6 +89,7 @@
     1.4                  JVM_FillInStackTrace;
     1.5                  JVM_FindClassFromClass;
     1.6                  JVM_FindClassFromClassLoader;
     1.7 +                JVM_FindClassFromBootLoader;
     1.8                  JVM_FindLibraryEntry;
     1.9                  JVM_FindLoadedClass;
    1.10                  JVM_FindPrimitiveClass;
     2.1 --- a/make/linux/makefiles/mapfile-vers-product	Tue Jun 17 09:59:59 2008 -0700
     2.2 +++ b/make/linux/makefiles/mapfile-vers-product	Tue Jun 17 13:08:15 2008 -0700
     2.3 @@ -89,6 +89,7 @@
     2.4                  JVM_FillInStackTrace;
     2.5                  JVM_FindClassFromClass;
     2.6                  JVM_FindClassFromClassLoader;
     2.7 +                JVM_FindClassFromBootLoader;
     2.8                  JVM_FindLibraryEntry;
     2.9                  JVM_FindLoadedClass;
    2.10                  JVM_FindPrimitiveClass;
     3.1 --- a/make/solaris/makefiles/mapfile-vers	Tue Jun 17 09:59:59 2008 -0700
     3.2 +++ b/make/solaris/makefiles/mapfile-vers	Tue Jun 17 13:08:15 2008 -0700
     3.3 @@ -89,6 +89,7 @@
     3.4  		JVM_FillInStackTrace;
     3.5  		JVM_FindClassFromClass;
     3.6  		JVM_FindClassFromClassLoader;
     3.7 +		JVM_FindClassFromBootLoader;
     3.8  		JVM_FindLibraryEntry;
     3.9  		JVM_FindLoadedClass;
    3.10  		JVM_FindPrimitiveClass;
     4.1 --- a/make/solaris/makefiles/reorder_COMPILER1_i486	Tue Jun 17 09:59:59 2008 -0700
     4.2 +++ b/make/solaris/makefiles/reorder_COMPILER1_i486	Tue Jun 17 13:08:15 2008 -0700
     4.3 @@ -2175,6 +2175,7 @@
     4.4  text: .text%jni_GetStringUTFRegion: jni.o;
     4.5  text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_;
     4.6  text: .text%JVM_FindClassFromClassLoader;
     4.7 +text: .text%JVM_FindClassFromBootLoader;
     4.8  text: .text%JVM_IsInterface;
     4.9  text: .text%JVM_GetClassDeclaredConstructors;
    4.10  text: .text%__1cNmethodOopDescOis_initializer6kM_i_;
     5.1 --- a/make/solaris/makefiles/reorder_COMPILER1_sparc	Tue Jun 17 09:59:59 2008 -0700
     5.2 +++ b/make/solaris/makefiles/reorder_COMPILER1_sparc	Tue Jun 17 13:08:15 2008 -0700
     5.3 @@ -1500,6 +1500,7 @@
     5.4  text: .text%jni_GetStringUTFRegion: jni.o;
     5.5  text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_;
     5.6  text: .text%JVM_FindClassFromClassLoader;
     5.7 +text: .text%JVM_FindClassFromBootLoader;
     5.8  text: .text%JVM_IsInterface;
     5.9  text: .text%JVM_GetClassDeclaredConstructors;
    5.10  text: .text%__1cNmethodOopDescOis_initializer6kM_i_;
     6.1 --- a/make/solaris/makefiles/reorder_COMPILER2_amd64	Tue Jun 17 09:59:59 2008 -0700
     6.2 +++ b/make/solaris/makefiles/reorder_COMPILER2_amd64	Tue Jun 17 13:08:15 2008 -0700
     6.3 @@ -4339,6 +4339,7 @@
     6.4  text: .text%__1cFParseLarray_store6MnJBasicType__v_;
     6.5  text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o;
     6.6  text: .text%JVM_FindClassFromClassLoader;
     6.7 +text: .text%JVM_FindClassFromBootLoader;
     6.8  text: .text%__1cZCallInterpreterDirectNodeSalignment_required6kM_i_;
     6.9  text: .text%__1cZCallInterpreterDirectNodePoper_input_base6kM_I_;
    6.10  text: .text%__1cZCallInterpreterDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_;
     7.1 --- a/make/solaris/makefiles/reorder_COMPILER2_i486	Tue Jun 17 09:59:59 2008 -0700
     7.2 +++ b/make/solaris/makefiles/reorder_COMPILER2_i486	Tue Jun 17 13:08:15 2008 -0700
     7.3 @@ -4755,6 +4755,7 @@
     7.4  text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
     7.5  text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_;
     7.6  text: .text%JVM_FindClassFromClassLoader;
     7.7 +text: .text%JVM_FindClassFromBootLoader;
     7.8  text: .text%__1cPshrI_eReg_1NodeEsize6kMpnNPhaseRegAlloc__I_;
     7.9  text: .text%__1cHi2bNodeMideal_Opcode6kM_i_: ad_i486_misc.o;
    7.10  text: .text%__1cMmatch_option6FpknMJavaVMOption_pkcp4_i_: arguments.o;
     8.1 --- a/make/solaris/makefiles/reorder_COMPILER2_sparc	Tue Jun 17 09:59:59 2008 -0700
     8.2 +++ b/make/solaris/makefiles/reorder_COMPILER2_sparc	Tue Jun 17 13:08:15 2008 -0700
     8.3 @@ -3713,6 +3713,7 @@
     8.4  text: .text%__1cITemplateIgenerate6MpnZInterpreterMacroAssembler__v_;
     8.5  text: .text%__1cQregI_to_stkINodeHis_Copy6kM_I_: ad_sparc_misc.o;
     8.6  text: .text%JVM_FindClassFromClassLoader;
     8.7 +text: .text%JVM_FindClassFromBootLoader;
     8.8  text: .text%signalHandler;
     8.9  text: .text%__1cTtypeArrayKlassKlassIoop_size6kMpnHoopDesc__i_: typeArrayKlassKlass.o;
    8.10  text: .text%JVM_handle_solaris_signal;
     9.1 --- a/make/solaris/makefiles/reorder_COMPILER2_sparcv9	Tue Jun 17 09:59:59 2008 -0700
     9.2 +++ b/make/solaris/makefiles/reorder_COMPILER2_sparcv9	Tue Jun 17 13:08:15 2008 -0700
     9.3 @@ -3735,6 +3735,7 @@
     9.4  text: .text%__1cQjava_lang_ThreadRget_thread_status6FpnHoopDesc__n0AMThreadStatus__;
     9.5  text: .text%__1cIMulINodeGadd_id6kM_pknEType__: classes.o;
     9.6  text: .text%JVM_FindClassFromClassLoader;
     9.7 +text: .text%JVM_FindClassFromBootLoader;
     9.8  text: .text%__1cHTypePtrFempty6kM_i_;
     9.9  text: .text%__1cQaddP_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_;
    9.10  text: .text%__1cbFunnecessary_membar_volatileNodePoper_input_base6kM_I_: ad_sparc_misc.o;
    10.1 --- a/make/solaris/makefiles/reorder_TIERED_amd64	Tue Jun 17 09:59:59 2008 -0700
    10.2 +++ b/make/solaris/makefiles/reorder_TIERED_amd64	Tue Jun 17 13:08:15 2008 -0700
    10.3 @@ -4339,6 +4339,7 @@
    10.4  text: .text%__1cFParseLarray_store6MnJBasicType__v_;
    10.5  text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o;
    10.6  text: .text%JVM_FindClassFromClassLoader;
    10.7 +text: .text%JVM_FindClassFromBootLoader;
    10.8  text: .text%__1cZCallInterpreterDirectNodeSalignment_required6kM_i_;
    10.9  text: .text%__1cZCallInterpreterDirectNodePoper_input_base6kM_I_;
   10.10  text: .text%__1cZCallInterpreterDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_;
    11.1 --- a/make/solaris/makefiles/reorder_TIERED_i486	Tue Jun 17 09:59:59 2008 -0700
    11.2 +++ b/make/solaris/makefiles/reorder_TIERED_i486	Tue Jun 17 13:08:15 2008 -0700
    11.3 @@ -4755,6 +4755,7 @@
    11.4  text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
    11.5  text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_;
    11.6  text: .text%JVM_FindClassFromClassLoader;
    11.7 +text: .text%JVM_FindClassFromBootLoader;
    11.8  text: .text%__1cPshrI_eReg_1NodeEsize6kMpnNPhaseRegAlloc__I_;
    11.9  text: .text%__1cHi2bNodeMideal_Opcode6kM_i_: ad_i486_misc.o;
   11.10  text: .text%__1cMmatch_option6FpknMJavaVMOption_pkcp4_i_: arguments.o;
    12.1 --- a/make/solaris/makefiles/reorder_TIERED_sparc	Tue Jun 17 09:59:59 2008 -0700
    12.2 +++ b/make/solaris/makefiles/reorder_TIERED_sparc	Tue Jun 17 13:08:15 2008 -0700
    12.3 @@ -3713,6 +3713,7 @@
    12.4  text: .text%__1cITemplateIgenerate6MpnZInterpreterMacroAssembler__v_;
    12.5  text: .text%__1cQregI_to_stkINodeHis_Copy6kM_I_: ad_sparc_misc.o;
    12.6  text: .text%JVM_FindClassFromClassLoader;
    12.7 +text: .text%JVM_FindClassFromBootLoader;
    12.8  text: .text%signalHandler;
    12.9  text: .text%__1cTtypeArrayKlassKlassIoop_size6kMpnHoopDesc__i_: typeArrayKlassKlass.o;
   12.10  text: .text%JVM_handle_solaris_signal;
    13.1 --- a/make/windows/makefiles/vm.make	Tue Jun 17 09:59:59 2008 -0700
    13.2 +++ b/make/windows/makefiles/vm.make	Tue Jun 17 13:08:15 2008 -0700
    13.3 @@ -88,13 +88,20 @@
    13.4  !endif
    13.5  !endif
    13.6  
    13.7 -LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000  \
    13.8 -  /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM    \
    13.9 -  /export:JNI_GetCreatedJavaVMs /export:jio_snprintf               \
   13.10 -  /export:jio_printf /export:jio_fprintf                           \
   13.11 -  /export:jio_vfprintf /export:jio_vsnprintf $(AGCT_EXPORT)        \
   13.12 -  /export:JVM_GetVersionInfo \
   13.13 -  /export:JVM_GetThreadStateNames /export:JVM_GetThreadStateValues \
   13.14 +LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
   13.15 +  /export:JNI_GetDefaultJavaVMInitArgs       \
   13.16 +  /export:JNI_CreateJavaVM                   \
   13.17 +  /export:JVM_FindClassFromBootLoader        \
   13.18 +  /export:JNI_GetCreatedJavaVMs              \
   13.19 +  /export:jio_snprintf                       \
   13.20 +  /export:jio_printf                         \
   13.21 +  /export:jio_fprintf                        \
   13.22 +  /export:jio_vfprintf                       \
   13.23 +  /export:jio_vsnprintf                      \
   13.24 +  $(AGCT_EXPORT)                             \
   13.25 +  /export:JVM_GetVersionInfo                 \
   13.26 +  /export:JVM_GetThreadStateNames            \
   13.27 +  /export:JVM_GetThreadStateValues           \
   13.28    /export:JVM_InitAgentProperties
   13.29  
   13.30  CPP_INCLUDE_DIRS=\
    14.1 --- a/src/share/vm/prims/jvm.cpp	Tue Jun 17 09:59:59 2008 -0700
    14.2 +++ b/src/share/vm/prims/jvm.cpp	Tue Jun 17 13:08:15 2008 -0700
    14.3 @@ -624,6 +624,30 @@
    14.4    if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
    14.5  JVM_END
    14.6  
    14.7 +// Rationale behind JVM_FindClassFromBootLoader
    14.8 +// a> JVM_FindClassFromClassLoader was never exported in the export tables.
    14.9 +// b> because of (a) java.dll has a direct dependecy on the  unexported
   14.10 +//    private symbol "_JVM_FindClassFromClassLoader@20".
   14.11 +// c> the launcher cannot use the private symbol as it dynamically opens
   14.12 +//    the entry point, so if something changes, the launcher will fail
   14.13 +//    unexpectedly at runtime, it is safest for the launcher to dlopen a
   14.14 +//    stable exported interface.
   14.15 +// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its
   14.16 +//    signature to change from _JVM_FindClassFromClassLoader@20 to
   14.17 +//    JVM_FindClassFromClassLoader and will not be backward compatible
   14.18 +//    with older JDKs.
   14.19 +// Thus a public/stable exported entry point is the right solution,
   14.20 +// public here means public in linker semantics, and is exported only
   14.21 +// to the JDK, and is not intended to be a public API.
   14.22 +
   14.23 +JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
   14.24 +                                              const char* name,
   14.25 +                                              jboolean throwError))
   14.26 +  JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name,
   14.27 +              throwError ? "error" : "exception");
   14.28 +  return JVM_FindClassFromClassLoader(env, name, JNI_FALSE,
   14.29 +                                      (jobject)NULL, throwError);
   14.30 +JVM_END
   14.31  
   14.32  JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
   14.33                                                 jboolean init, jobject loader,
    15.1 --- a/src/share/vm/prims/jvm.h	Tue Jun 17 09:59:59 2008 -0700
    15.2 +++ b/src/share/vm/prims/jvm.h	Tue Jun 17 13:08:15 2008 -0700
    15.3 @@ -390,6 +390,17 @@
    15.4                               jobject loader, jboolean throwError);
    15.5  
    15.6  /*
    15.7 + * Find a class from a boot class loader. Throw ClassNotFoundException
    15.8 + * or NoClassDefFoundError depending on the value of the last
    15.9 + * argument. This is the same as FindClassFromClassLoader but provided
   15.10 + * as a convenience method exported correctly on all platforms for
   15.11 + * JSR 277 launcher class loading.
   15.12 + */
   15.13 +JNIEXPORT jclass JNICALL
   15.14 +JVM_FindClassFromBootLoader(JNIEnv *env, const char *name,
   15.15 +                            jboolean throwError);
   15.16 +
   15.17 +/*
   15.18   * Find a class from a given class.
   15.19   */
   15.20  JNIEXPORT jclass JNICALL

mercurial