changeset 1469:147eb19a7637

2009-04-16 Omair Majid <omajid@redhat.com> * patches/hotspot/default/icedtea-ignore-unrecognized-options.patch: New file. Adds -XX:+IgnoreUnrecognizedVMOptions flag to hotspot. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above.
author Omair Majid <omajid@redhat.com>
date Thu, 16 Apr 2009 10:55:27 -0400
parents 03be2128639f
children 7e38108fb278
files ChangeLog HACKING Makefile.am patches/hotspot/default/icedtea-ignore-unrecognized-options.patch
diffstat 4 files changed, 86 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Apr 15 12:47:36 2009 +0100
+++ b/ChangeLog	Thu Apr 16 10:55:27 2009 -0400
@@ -1,3 +1,10 @@
+2009-04-16  Omair Majid  <omajid@redhat.com>
+
+	* patches/hotspot/default/icedtea-ignore-unrecognized-options.patch: New
+	file. Adds -XX:+IgnoreUnrecognizedVMOptions flag to hotspot.
+	* Makefile.am (ICEDTEA_PATCHES): Apply the above.
+	* HACKING: Document the above.
+
 2009-04-15  Gary Benson  <gbenson@redhat.com>
 	    Xerxes RĂ„nby <xerxes@zafena.se>
 
--- a/HACKING	Wed Apr 15 12:47:36 2009 +0100
+++ b/HACKING	Thu Apr 16 10:55:27 2009 -0400
@@ -94,6 +94,7 @@
 * icedtea-network-unreachable.patch: Check for ENETUNREACH and EHOSTUNREACH early on when doing a Socket.connect().
 * icedtea-jtreg-printjob-edgetest-manual.patch: Mark test that requires user interaction as manual.
 * icedtea-jtreg-jrunscript.patch: Fix jrunscript test so it works with newer versions of rhino (by comparing the actual numbers).
+* icedtea-ignore-unrecognized-options.patch: Add -XX:+IgnoreUnrecognizedVMOptions flag to hotspot (S6788376).
 
 The following patches are only applied to OpenJDK6 in IcedTea6:
 
--- a/Makefile.am	Wed Apr 15 12:47:36 2009 +0100
+++ b/Makefile.am	Thu Apr 16 10:55:27 2009 -0400
@@ -632,7 +632,8 @@
 	patches/icedtea-fortify-source.patch \
 	patches/hotspot/$(HSBUILD)/icedtea-sparc-buildfixes.patch \
 	patches/hotspot/$(HSBUILD)/icedtea-6791168.patch \
-	patches/hotspot/$(HSBUILD)/icedtea-includedb.patch
+	patches/hotspot/$(HSBUILD)/icedtea-includedb.patch \
+	patches/hotspot/$(HSBUILD)/icedtea-ignore-unrecognized-options.patch
 endif
 
 if !WITH_ALT_HSBUILD
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-ignore-unrecognized-options.patch	Thu Apr 16 10:55:27 2009 -0400
@@ -0,0 +1,76 @@
+--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Wed Feb 04 23:17:38 2009 -0800
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Thu Feb 05 13:38:52 2009 -0800
+@@ -2478,7 +2478,7 @@ jint Arguments::parse_options_environmen
+     vm_args.version = JNI_VERSION_1_2;
+     vm_args.options = options;
+     vm_args.nOptions = i;
+-    vm_args.ignoreUnrecognized = false;
++    vm_args.ignoreUnrecognized = IgnoreUnrecognizedVMOptions;
+ 
+     if (PrintVMOptions) {
+       const char* tail;
+@@ -2525,13 +2525,12 @@ jint Arguments::parse(const JavaVMInitAr
+ 
+   // If flag "-XX:Flags=flags-file" is used it will be the first option to be processed.
+   bool settings_file_specified = false;
++  const char* flags_file;
+   int index;
+   for (index = 0; index < args->nOptions; index++) {
+     const JavaVMOption *option = args->options + index;
+     if (match_option(option, "-XX:Flags=", &tail)) {
+-      if (!process_settings_file(tail, true, args->ignoreUnrecognized)) {
+-        return JNI_EINVAL;
+-      }
++      flags_file = tail;
+       settings_file_specified = true;
+     }
+     if (match_option(option, "-XX:+PrintVMOptions", &tail)) {
+@@ -2539,6 +2538,24 @@ jint Arguments::parse(const JavaVMInitAr
+     }
+     if (match_option(option, "-XX:-PrintVMOptions", &tail)) {
+       PrintVMOptions = false;
++    }
++    if (match_option(option, "-XX:+IgnoreUnrecognizedVMOptions", &tail)) {
++      IgnoreUnrecognizedVMOptions = true;
++    }
++    if (match_option(option, "-XX:-IgnoreUnrecognizedVMOptions", &tail)) {
++      IgnoreUnrecognizedVMOptions = false;
++    }
++  }
++
++  if (IgnoreUnrecognizedVMOptions) {
++    // uncast const to modify the flag args->ignoreUnrecognized
++    *(jboolean*)(&args->ignoreUnrecognized) = true;
++  }
++
++  // Parse specified settings file
++  if (settings_file_specified) {
++    if (!process_settings_file(flags_file, true, args->ignoreUnrecognized)) {
++      return JNI_EINVAL;
+     }
+   }
+ 
+--- openjdk/hotspot/src/share/vm/runtime/globals.hpp	Wed Feb 04 23:17:38 2009 -0800
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	Thu Feb 05 13:38:52 2009 -0800
+@@ -2167,6 +2167,9 @@ class CommandLineFlags {
+   product(bool, PrintVMOptions, trueInDebug,                                \
+          "print VM flag settings")                                          \
+                                                                             \
++  product(bool, IgnoreUnrecognizedVMOptions, false,                         \
++         "Ignore unrecognized VM options")                                  \
++                                                                            \
+   diagnostic(bool, SerializeVMOutput, true,                                 \
+          "Use a mutex to serialize output to tty and hotspot.log")          \
+                                                                             \
+--- openjdk/hotspot/test/compiler/6775880/Test.java	Wed Feb 04 23:17:38 2009 -0800
++++ openjdk/hotspot/test/compiler/6775880/Test.java	Thu Feb 05 13:38:52 2009 -0800
+@@ -27,7 +27,7 @@
+  * @bug 6775880
+  * @summary EA +DeoptimizeALot: assert(mon_info->owner()->is_locked(),"object must be locked now")
+  * @compile -source 1.4 -target 1.4 Test.java
+- * @run main/othervm -server -Xbatch -XX:+DoEscapeAnalysis -XX:+DeoptimizeALot -XX:CompileCommand=exclude,java.lang.AbstractStringBuilder::append Test
++ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xbatch -XX:+DoEscapeAnalysis -XX:+DeoptimizeALot -XX:CompileCommand=exclude,java.lang.AbstractStringBuilder::append Test
+  */
+ 
+ public class Test {
+