~ubuntu-branches/ubuntu/oneiric/openjdk-7/oneiric-security

« back to all changes in this revision

Viewing changes to patches/systemtap.patch

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-10-17 16:22:48 UTC
  • mfrom: (1.3.11) (8.1.25 quantal)
  • Revision ID: package-import@ubuntu.com-20121017162248-steblyv2lnk2t951
Tags: 7u9-2.3.3-0ubuntu1~11.10.1
Build IcedTea7 2.3.3 for oneiric.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
diff -Nru openjdk.orig/hotspot/make/linux/makefiles/dtrace.make openjdk/hotspot/make/linux/makefiles/dtrace.make
2
 
--- openjdk.orig/hotspot/make/linux/makefiles/dtrace.make       2010-07-29 21:54:46.000000000 +0100
3
 
+++ openjdk/hotspot/make/linux/makefiles/dtrace.make    2011-03-16 20:52:47.269527251 +0000
 
2
--- openjdk.orig/hotspot/make/linux/makefiles/dtrace.make       2012-02-22 14:54:31.000000000 +0000
 
3
+++ openjdk/hotspot/make/linux/makefiles/dtrace.make    2012-03-18 18:54:13.482968139 +0000
4
4
@@ -25,3 +25,7 @@
5
5
 # Linux does not build jvm_db
6
6
 LIBJVM_DB =
10
10
+
11
11
+# It doesn't support HAVE_DTRACE_H though.
12
12
diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jni.cpp openjdk/hotspot/src/share/vm/prims/jni.cpp
13
 
--- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp     2011-03-14 22:09:03.000000000 +0000
14
 
+++ openjdk/hotspot/src/share/vm/prims/jni.cpp  2011-03-16 20:52:47.277527381 +0000
15
 
@@ -1817,10 +1817,7 @@
 
13
--- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp     2012-02-22 14:54:31.000000000 +0000
 
14
+++ openjdk/hotspot/src/share/vm/prims/jni.cpp  2012-03-18 18:54:13.502968466 +0000
 
15
@@ -2818,10 +2818,7 @@
16
16
 JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
17
17
   JNIWrapper("Set" XSTR(Result) "Field"); \
18
18
 \
24
24
 \
25
25
   oop o = JNIHandles::resolve_non_null(obj); \
26
26
   klassOop k = o->klass(); \
27
 
@@ -1994,10 +1991,7 @@
 
27
@@ -3128,10 +3125,7 @@
28
28
 \
29
29
 JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
30
30
   JNIWrapper("SetStatic" XSTR(Result) "Field"); \
36
36
 \
37
37
   JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
38
38
   assert(id->is_static_field_id(), "invalid static field id"); \
39
 
diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
40
 
--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp     2011-03-16 20:51:33.000000000 +0000
41
 
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp  2011-03-16 20:52:47.277527381 +0000
42
 
@@ -2634,16 +2634,16 @@
43
 
       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false);
44
 
       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true);
45
 
     } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) {
46
 
-#ifdef SOLARIS
47
 
+#ifdef DTRACE_ENABLED
48
 
       FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true);
49
 
       FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true);
50
 
       FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true);
51
 
       FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true);
52
 
-#else // ndef SOLARIS
53
 
+#else // ndef DTRACE_ENABLED
54
 
       jio_fprintf(defaultStream::error_stream(),
55
 
-                  "ExtendedDTraceProbes flag is only applicable on Solaris\n");
56
 
+                  "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n");
57
 
       return JNI_EINVAL;
58
 
-#endif // ndef SOLARIS
59
 
+#endif // ndef DTRACE_ENABLED
60
 
 #ifdef ASSERT
61
 
     } else if (match_option(option, "-XX:+FullGCALot", &tail)) {
62
 
       FLAG_SET_CMDLINE(bool, FullGCALot, true);
63
 
diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp openjdk/hotspot/src/share/vm/utilities/dtrace.hpp
64
 
--- openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp      2011-03-14 22:09:03.000000000 +0000
65
 
+++ openjdk/hotspot/src/share/vm/utilities/dtrace.hpp   2011-03-16 20:53:58.314683506 +0000
 
39
--- openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp      2012-02-22 15:54:31.000000000 +0100
 
40
+++ openjdk/hotspot/src/share/vm/utilities/dtrace.hpp   2012-03-27 13:12:15.857491730 +0200
66
41
@@ -1,5 +1,6 @@
67
42
 /*
68
43
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
69
 
+ * Copyright 2009 Red Hat, Inc.
 
44
+ * Copyright (c) 2009, 2012 Red Hat, Inc.
70
45
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
71
46
  *
72
47
  * This code is free software; you can redistribute it and/or modify it
73
 
@@ -25,7 +26,7 @@
74
 
 #ifndef SHARE_VM_UTILITIES_DTRACE_HPP
75
 
 #define SHARE_VM_UTILITIES_DTRACE_HPP
76
 
 
77
 
-#if defined(SOLARIS) && defined(DTRACE_ENABLED)
78
 
+#if defined(DTRACE_ENABLED)
79
 
 
80
 
 #include <sys/sdt.h>
81
 
 
82
 
@@ -36,7 +37,7 @@
 
48
@@ -32,12 +33,15 @@
 
49
 #define DTRACE_ONLY(x) x
 
50
 #define NOT_DTRACE(x)
 
51
 
 
52
+#if defined(SOLARIS)
 
53
 // Work around dtrace tail call bug 6672627 until it is fixed in solaris 10.
83
54
 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \
84
55
   do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0)
85
56
 
86
 
-#else // ndef SOLARIS || ndef DTRACE_ENABLED
87
 
+#else // ndef DTRACE_ENABLED
88
 
 
89
 
 #define DTRACE_ONLY(x)
90
 
 #define NOT_DTRACE(x) x
91
 
@@ -47,11 +48,18 @@
 
57
-#if defined(SOLARIS)
 
58
 #define USDT1 1
 
59
+#elif defined(LINUX)
 
60
+#define USDT1 1
 
61
+#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
 
62
 #elif defined(__APPLE__)
 
63
 #define USDT2 1
 
64
 #include <sys/types.h>
 
65
@@ -63,6 +67,11 @@
92
66
 #define DTRACE_PROBE3(a,b,c,d,e) {;}
93
67
 #define DTRACE_PROBE4(a,b,c,d,e,f) {;}
94
68
 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
98
72
+#define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;}
99
73
+#define DTRACE_PROBE10(a,b,c,d,e,f,g,h,i,j,k,l) {;}
100
74
 
101
 
 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
102
 
 
103
 
 #endif
104
 
 
105
 
+#if defined(SOLARIS)
106
 
+// Solaris dtrace needs actual extern function decls.
 
75
 #else /* USDT2 */
 
76
 
 
77
@@ -76,10 +85,19 @@
107
78
 #define HS_DTRACE_PROBE_FN(provider,name)\
108
79
   __dtrace_##provider##___##name
109
80
 
110
 
@@ -59,6 +67,11 @@
 
81
+#ifdef SOLARIS
 
82
+// Solaris dtrace needs actual extern function decls.
 
83
 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \
111
84
   DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args)
112
85
 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \
113
86
   DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args)
114
 
+#else
 
87
+#elif defined(LINUX)
115
88
+// Systemtap dtrace compatible probes on GNU/Linux don't.
116
89
+#define HS_DTRACE_PROBE_DECL_N(provider,name,args)
117
90
+#define HS_DTRACE_PROBE_CDECL_N(provider,name,args)
118
 
+#endif 
 
91
+#else
 
92
+#error "USDT1 enabled for unknown os"
 
93
+#endif
119
94
 
120
95
 /* Dtrace probe declarations */
121
96
 #define HS_DTRACE_PROBE_DECL(provider,name) \
122
 
@@ -97,6 +110,8 @@
 
97
@@ -118,6 +136,8 @@
123
98
     uintptr_t,uintptr_t,uintptr_t))
124
99
 
125
100
 /* Dtrace probe definitions */
128
103
 #define HS_DTRACE_PROBE_N(provider,name, args) \
129
104
   DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args)
130
105
 
131
 
@@ -132,5 +147,31 @@
 
106
@@ -153,6 +173,34 @@
132
107
   HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
133
108
     (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\
134
109
     (uintptr_t)a8,(uintptr_t)a9))
135
 
+#else
 
110
+#elif defined(LINUX)
136
111
+// Systemtap dtrace compatible probes on GNU/Linux use direct macros.
137
112
+#define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name)
138
113
+#define HS_DTRACE_PROBE0(provider,name)\
157
132
+  DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
158
133
+#define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
159
134
+  DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
 
135
+#else
 
136
+#error "USDT1 enabled for unknown os"
160
137
+#endif
161
138
 
162
 
 #endif // SHARE_VM_UTILITIES_DTRACE_HPP
 
139
 #endif /* !USDT2 */
 
140