Small VM change for booting from a module
Karen Kinnear
Karen.Kinnear at Sun.COM
Thu May 14 12:31:57 PDT 2009
Thanks Mark - looks good.
thanks,
Karen
On May 14, 2009, at 3:29 PM, Mark Reinhold wrote:
>> Date: Thu, 14 May 2009 13:37:11 -0400
>> From: karen.kinnear at sun.com
>
>> It appears that meta_index_path and meta_index_dir are by default
>> NULL. I'm not sure what happens on different OSs when
>> classLoader.cpp:
>> setup_meta_index calls fopen(meta_index_path, "r") and passes in a
>> null. You might be safer initializing those values in
>> os::set_boot_path.
>
> Good point, but I have no values to which to initialize them, and am
> unlikely to have such values even in the long run. I've instead added
> a check to ClassLoader::setup_meta_index so it doesn't open the file
> if
> meta_index_path is null.
>
>> I'm assuming you want to deal with Class Data Sharing compatibility
>> after J1.
>
> Yes!
>
>> If it helps to model usage of the new property, today CDS
>> requires that the bootclasspath contain individual jars, not lists of
>> directories, to reduce having to check timestamp and file size for
>> all
>> .class files, and reduce startup costs.
>
> Thanks for pointing that out -- I'll keep it in mind.
>
>> If you want to know what the vm is using for the sysclasspath you can
>> run with -XX:+TraceClassLoading -XX:+Verbose, if you are running
>> fastdebug.
>
> Right, already found those.
>
>> Also, there is a comment in ClassLoader.cpp you might want to check
>> into:
>> ... doesn't reorder the bootclasspath which would break
>> java.lang.Package (see PackageInfo).
>
> Yes, I already ran across that one too. My present tiny change
> shouldn't
> affect this. It turns out that in order to support multi-module
> packages
> on the boot class path I'll eventually have to expose this method
> through
> a new JVM_ interface, but that's for another day.
>
>> Date: Thu, 14 May 2009 14:03:09 -0400
>> From: karen.kinnear at sun.com
>
>> There does exist a -Xbootclasspath: flag already if you just want
>> to use
>> that, or -Xbootclasspath/p: if you want to prepend or -
>> Xbootclasspath/a:
>> to append, a different location.
>
> I thought about doing that as a short-term hack, but since the VM will
> ultimately have to do something module-specific I'd prefer to go with
> what I have now even if it is, at the moment, technically equivalent
> to
> -Xbootclasspath.
>
> Updated webrev: http://cr.openjdk.java.net/~mr/vm-module-boot/
> (only change is to classLoader.cpp)
>
> Thanks,
> - Mark
More information about the jigsaw-dev
mailing list