[vmkit-commits] [PATCH] Always add bootclasspath, regardless of precompiled state

Nicolas Geoffray nicolas.geoffray at gmail.com
Wed Oct 26 13:02:14 PDT 2011


On Wed, Oct 26, 2011 at 12:41 AM, Will Dietz <wdietz2 at illinois.edu> wrote:

> Inlined below.
>
> This patch does raise the following question:
>
> When precompiling, is the goal/claim that *every* class offered from
> the boot classpath is compiled?
>

No. And yes :) The classes are actually not compiled. All classes are just
stored in binary in the generated executable. The reason for doing that is
that you avoid parsing a zip file at startup, so startup is faster.


>
> If not, then this patch makes sense--if so, then I have some work to do :).
>

I think you have some work to do :) But you should know the boot classpath
when compiling J3 right?


>
> ~Will
>
> >From 8f6b60cc84257f808a11e888394f710180924bae Mon Sep 17 00:00:00 2001
> From: Will Dietz <w at wdtz.org>
> Date: Tue, 25 Oct 2011 17:36:21 -0500
> Subject: [PATCH] Always use bootClasspathEnv regardless of precompiled.
>
> ---
>  lib/J3/VMCore/JnjvmClassLoader.cpp |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/J3/VMCore/JnjvmClassLoader.cpp
> b/lib/J3/VMCore/JnjvmClassLoader.cpp
> index acea822..dc8d0af 100644
> --- a/lib/J3/VMCore/JnjvmClassLoader.cpp
> +++ b/lib/J3/VMCore/JnjvmClassLoader.cpp
> @@ -72,13 +72,13 @@
> JnjvmBootstrapLoader::JnjvmBootstrapLoader(mvm::BumpPtrAllocator&
> Alloc,
>   if (dlLoad) {
>     bootLoaded = Precompiled::Init(this);
>   }
> -
> +
> +  // Analyze the boot classpath
> +  analyseClasspathEnv(bootClasspathEnv);
>

This should really stay in the if (!bootLoaded) test. It actually parses the
zip files on the boot classpath, which does have an impact on startup time.


> +
>   if (!bootLoaded) {
>     classes = new(allocator, "ClassMap") ClassMap();
>     hashUTF8 = new(allocator, "UTF8Map") UTF8Map(allocator);
> -    // Analyze the boot classpath, we know bootstrap classes are not in
> the
> -    // executable.
> -    analyseClasspathEnv(bootClasspathEnv);
>
>     // Allocate the interfaces array for array classes, so that VT
> construction
>     // can use it right away.
> --
> 1.7.5.1
> _______________________________________________
> vmkit-commits mailing list
> vmkit-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20111026/faadf28e/attachment.html>


More information about the vmkit-commits mailing list