changeset 1991:3dbe18286f7a

Apply HotSpot patches before conditional patches. 2010-10-07 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Move HotSpot patches up so they aren't affected by conditional patches. * patches/icedtea-systemtap.patch: Fix to apply after the hs16 sparc patch.
author Andrew John Hughes <ahughes@redhat.com>
date Thu, 07 Oct 2010 14:10:27 +0100
parents 7215a5763a4e
children a6202fb4b8c4
files ChangeLog Makefile.am patches/icedtea-systemtap.patch
diffstat 3 files changed, 68 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 06 16:27:10 2010 +0100
+++ b/ChangeLog	Thu Oct 07 14:10:27 2010 +0100
@@ -1,3 +1,10 @@
+2010-10-07  Andrew John Hughes  <ahughes@redhat.com>
+
+	* Makefile.am: Move HotSpot patches up
+	so they aren't affected by conditional patches.
+	* patches/icedtea-systemtap.patch:
+	Fix to apply after the hs16 sparc patch.
+
 2010-10-06  Andrew John Hughes  <ahughes@redhat.com>
 
 	* configure.ac: Bump to 1.7.5.
--- a/Makefile.am	Wed Oct 06 16:27:10 2010 +0100
+++ b/Makefile.am	Thu Oct 07 14:10:27 2010 +0100
@@ -363,6 +363,20 @@
 	patches/openjdk/6650759-missing_inference.patch \
 	patches/numa_on_early_glibc.patch
 
+if WITH_ALT_HSBUILD
+ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \
+	patches/hotspot/$(HSBUILD)/zero.patch \
+	patches/hotspot/$(HSBUILD)/shark.patch \
+	patches/hotspot/$(HSBUILD)/6951319-sparc_build_fixes.patch
+else
+ICEDTEA_PATCHES += patches/hotspot/original/icedtea-6778662-lib64.patch \
+	patches/hotspot/original/icedtea-6778657-f2i-overflow.patch \
+	patches/hotspot/original/icedtea-6791168.patch \
+	patches/hotspot/original/icedtea-6793825-includedb.patch \
+	patches/openjdk/6822370-reentrantreadwritelock.patch \
+	patches/hotspot/original/6539464-consistent-math.patch
+endif
+
 if WITH_RHINO
 ICEDTEA_PATCHES += \
 	patches/icedtea-rhino.patch
@@ -409,20 +423,6 @@
 		   patches/icedtea-nss-6763530.patch
 endif
 
-if WITH_ALT_HSBUILD
-ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \
-	patches/hotspot/$(HSBUILD)/zero.patch \
-	patches/hotspot/$(HSBUILD)/shark.patch \
-	patches/hotspot/$(HSBUILD)/6951319-sparc_build_fixes.patch
-else
-ICEDTEA_PATCHES += patches/hotspot/original/icedtea-6778662-lib64.patch \
-	patches/hotspot/original/icedtea-6778657-f2i-overflow.patch \
-	patches/hotspot/original/icedtea-6791168.patch \
-	patches/hotspot/original/icedtea-6793825-includedb.patch \
-	patches/openjdk/6822370-reentrantreadwritelock.patch \
-	patches/hotspot/original/6539464-consistent-math.patch
-endif
-
 if HAS_PAX
 ICEDTEA_PATCHES += patches/no-test_gamma.patch
 endif
--- a/patches/icedtea-systemtap.patch	Wed Oct 06 16:27:10 2010 +0100
+++ b/patches/icedtea-systemtap.patch	Thu Oct 07 14:10:27 2010 +0100
@@ -1,6 +1,6 @@
-diff -r 945bf7540697 make/linux/makefiles/dtrace.make
---- openjdk/hotspot/make/linux/makefiles/dtrace.make	Thu Jan 22 14:42:01 2009 -0800
-+++ openjdk/hotspot/make/linux/makefiles/dtrace.make	Mon Feb 02 13:47:34 2009 +0100
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/dtrace.make openjdk/hotspot/make/linux/makefiles/dtrace.make
+--- openjdk.orig/hotspot/make/linux/makefiles/dtrace.make	2009-12-08 23:12:17.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/dtrace.make	2010-10-07 11:45:17.510211682 +0100
 @@ -25,3 +25,7 @@
  # Linux does not build jvm_db
  LIBJVM_DB =
@@ -9,9 +9,10 @@
 +CFLAGS += -DDTRACE_ENABLED
 +
 +# It doesn't support HAVE_DTRACE_H though.
---- openjdk/hotspot/src/share/vm/prims/jni.cpp	2009-10-13 15:34:52.499809508 +0200
-+++ openjdk/hotspot/src/share/vm/prims/jni.cpp	2009-10-13 15:31:26.117823588 +0200
-@@ -1747,10 +1744,7 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jni.cpp openjdk/hotspot/src/share/vm/prims/jni.cpp
+--- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp	2010-10-06 21:54:38.000000000 +0100
++++ openjdk/hotspot/src/share/vm/prims/jni.cpp	2010-10-07 11:45:17.510211682 +0100
+@@ -1753,10 +1753,7 @@
  JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
    JNIWrapper("Set" XSTR(Result) "Field"); \
  \
@@ -23,7 +24,7 @@
  \
    oop o = JNIHandles::resolve_non_null(obj); \
    klassOop k = o->klass(); \
-@@ -1924,10 +1918,7 @@
+@@ -1930,10 +1927,7 @@
  \
  JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
    JNIWrapper("SetStatic" XSTR(Result) "Field"); \
@@ -35,7 +36,7 @@
  \
    JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
    assert(id->is_static_field_id(), "invalid static field id"); \
-@@ -2116,7 +2101,7 @@
+@@ -2116,7 +2110,7 @@
    DT_RETURN_MARK(GetObjectArrayElement, jobject, (const jobject&)ret);
    objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array));
    if (a->is_within_bounds(index)) {
@@ -44,7 +45,7 @@
      return ret;
    } else {
      char buf[jintAsStringSize];
-@@ -2150,14 +2150,14 @@
+@@ -2150,14 +2144,14 @@
  
  #define DEFINE_NEWSCALARARRAY(Return,Allocator,Result) \
  \
@@ -61,10 +62,33 @@
  \
    oop obj= oopFactory::Allocator(len, CHECK_0); \
    ret = (Return) JNIHandles::make_local(env, obj); \
-
-diff -r 945bf7540697 src/share/vm/utilities/dtrace.hpp
---- openjdk/hotspot/src/share/vm/utilities/dtrace.hpp	Thu Jan 22 14:42:01 2009 -0800
-+++ openjdk/hotspot/src/share/vm/utilities/dtrace.hpp	Mon Feb 02 13:47:34 2009 +0100
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2010-10-06 21:54:42.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2010-10-07 11:45:17.510211682 +0100
+@@ -2352,16 +2352,16 @@
+       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false);
+       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true);
+     } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) {
+-#ifdef SOLARIS
++#ifdef DTRACE_ENABLED
+       FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true);
+       FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true);
+       FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true);
+       FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true);
+-#else // ndef SOLARIS
++#else // ndef DTRACE_ENABLED
+       jio_fprintf(defaultStream::error_stream(),
+-                  "ExtendedDTraceProbes flag is only applicable on Solaris\n");
++                  "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n");
+       return JNI_EINVAL;
+-#endif // ndef SOLARIS
++#endif // ndef DTRACE_ENABLED
+     } else
+ #ifdef ASSERT
+     if (match_option(option, "-XX:+FullGCALot", &tail)) {
+diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp openjdk/hotspot/src/share/vm/utilities/dtrace.hpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp	2010-10-06 21:54:47.000000000 +0100
++++ openjdk/hotspot/src/share/vm/utilities/dtrace.hpp	2010-10-07 11:46:11.357276841 +0100
 @@ -1,5 +1,6 @@
  /*
   * Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
@@ -72,7 +96,7 @@
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
-@@ -22,14 +23,14 @@
+@@ -22,7 +23,7 @@
   *
   */
  
@@ -81,15 +105,16 @@
  
  #include <sys/sdt.h>
  
- #define DTRACE_ONLY(x) x
- #define NOT_DTRACE(x)
+@@ -33,7 +34,7 @@
+ #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \
+   do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0)
  
 -#else // ndef SOLARIS || ndef DTRACE_ENABLED
 +#else // ndef DTRACE_ENABLED
  
  #define DTRACE_ONLY(x)
  #define NOT_DTRACE(x) x
-@@ -40,9 +41,16 @@
+@@ -44,11 +45,18 @@
  #define DTRACE_PROBE3(a,b,c,d,e) {;}
  #define DTRACE_PROBE4(a,b,c,d,e,f) {;}
  #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
@@ -99,6 +124,8 @@
 +#define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;}
 +#define DTRACE_PROBE10(a,b,c,d,e,f,g,h,i,j,k,l) {;}
  
+ #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
+ 
  #endif
  
 +#if defined(SOLARIS)
@@ -106,7 +133,7 @@
  #define HS_DTRACE_PROBE_FN(provider,name)\
    __dtrace_##provider##___##name
  
-@@ -50,6 +58,11 @@
+@@ -56,6 +64,11 @@
    DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args)
  #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \
    DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args)
@@ -118,7 +145,7 @@
  
  /* Dtrace probe declarations */
  #define HS_DTRACE_PROBE_DECL(provider,name) \
-@@ -88,6 +101,8 @@
+@@ -94,6 +107,8 @@
      uintptr_t,uintptr_t,uintptr_t))
  
  /* Dtrace probe definitions */
@@ -127,7 +154,7 @@
  #define HS_DTRACE_PROBE_N(provider,name, args) \
    DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args)
  
-@@ -123,3 +138,29 @@
+@@ -129,3 +144,29 @@
    HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
      (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\
      (uintptr_t)a8,(uintptr_t)a9))
@@ -157,26 +184,3 @@
 +#define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
 +  DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
 +#endif
---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2009-03-04 14:39:43.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2009-03-04 22:11:37.000000000 +0100
-@@ -2272,16 +2272,16 @@
-       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false);
-       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true);
-     } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) {
--#ifdef SOLARIS
-+#ifdef DTRACE_ENABLED
-       FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true);
-       FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true);
-       FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true);
-       FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true);
--#else // ndef SOLARIS
-+#else // ndef DTRACE_ENABLED
-       jio_fprintf(defaultStream::error_stream(),
--                  "ExtendedDTraceProbes flag is only applicable on Solaris\n");
-+                  "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n");
-       return JNI_EINVAL;
--#endif // ndef SOLARIS
-+#endif // ndef DTRACE_ENABLED
-     } else
- #ifdef ASSERT
-     if (match_option(option, "-XX:+FullGCALot", &tail)) {