Mercurial > hg > release > icedtea-1.10
view patches/cacao/launcher.patch @ 1797:f06356634030
Forwardport --with-additional-vms support.
2009-05-01 Matthias Klose <doko@ubuntu.com>
* patches/cacao/launcher.patch: Create new thread depending on the
current VM.
* Makefile.am (ICEDTEA_PATCHES): Apply unconditionally.
(icedtea-against-icedtea): Add dependencies on stamps/add-cacao.stamp,
stamps/add-zero.stamp.
(icedtea-debug-against-icedtea): Add dependencies on
stamps/add-cacao-debug.stamp, stamps/add-zero-debug.stamp.
(stamps/add-{cacao,zero}{,-debug}.stamp: New.
(clean, stamps/download.stamp, clean-download, stamps/extract.stamp
stamps/cacao.stamp): Use BUILD_CACAO instead of WITH_CACAO.
(stamps/icedtea.stamp, stamps/icedtea-debug.stamp): Add VM aliases
for cacao and zero when configured as ZERO_BUILD or WITH_CACAO.
* configure.ac: New option --with-additional-vms=, new conditionals
ADD_CACAO_BUILD, ADD_ZERO_BUILD, ADD_SHARK_BUILD, BUILD_CACAO.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Wed, 20 May 2009 20:23:37 +0100 |
parents | 9adee4a3a8d1 |
children | ecb875f82ef5 |
line wrap: on
line source
diff -Nru openjdk.orig/jdk/make/docs/Makefile openjdk/jdk/make/docs/Makefile --- openjdk.orig/jdk/make/docs/Makefile 2009-05-19 01:11:05.000000000 +0100 +++ openjdk/jdk/make/docs/Makefile 2009-05-20 20:17:49.000000000 +0100 @@ -36,7 +36,7 @@ ifeq ($(ARCH_DATA_MODEL),64) MAX_VM_MEMORY = 1024 else - MAX_VM_MEMORY = 512 + MAX_VM_MEMORY = 768 endif # diff -Nru openjdk.orig/jdk/src/share/bin/java.c openjdk/jdk/src/share/bin/java.c --- openjdk.orig/jdk/src/share/bin/java.c 2009-05-19 01:11:05.000000000 +0100 +++ openjdk/jdk/src/share/bin/java.c 2009-05-20 20:22:14.000000000 +0100 @@ -175,6 +175,8 @@ InvocationFunctions ifn; } JavaMainArgs; +#define JNI_VERSION_CACAO 0xcaca0000 + /* * Entry point. */ @@ -1871,6 +1873,8 @@ { /* Create a new thread to create JVM and invoke main method */ JavaMainArgs args; + struct JDK1_1InitArgs cacao_args; + int jvm_init_rv; int rslt; args.argc = argc; @@ -1879,7 +1883,18 @@ args.classname = classname; args.ifn = *ifn; - rslt = ContinueInNewThread0(JavaMain, threadStackSize, (void*)&args); + memset((void*)&cacao_args, 0, sizeof(cacao_args)); + cacao_args.version = JNI_VERSION_CACAO; + + jvm_init_rv = ifn.GetDefaultJavaVMInitArgs(&cacao_args); + if (_launcher_debug) + printf("using cacao as VM: %s\n", (jvm_init_rv == 0) ? "yes" : "no"); + + if (jvm_init_rv == 0) + return JavaMain((void*)&args); + else + return ContinueInNewThread0(JavaMain, threadStackSize, (void*)&args); + /* If the caller has deemed there is an error we * simply return that, otherwise we return the value of * the callee