Mercurial > hg > truffle
annotate src/share/vm/utilities/dtrace.hpp @ 1721:413ad0331a0c
6977924: Changes for 6975078 produce build error with certain gcc versions
Summary: The changes introduced for 6975078 assign badHeapOopVal to the _allocation field in the ResourceObj class. In 32 bit linux builds with certain versions of gcc this assignment will be flagged as an error while compiling allocation.cpp. In 32 bit builds the constant value badHeapOopVal (which is cast to an intptr_t) is negative. The _allocation field is typed as an unsigned intptr_t and gcc catches this as an error.
Reviewed-by: jcoomes, ysr, phh
author | johnc |
---|---|
date | Wed, 18 Aug 2010 10:59:06 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
2 * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 #if defined(SOLARIS) && defined(DTRACE_ENABLED) | |
26 | |
27 #include <sys/sdt.h> | |
28 | |
29 #define DTRACE_ONLY(x) x | |
30 #define NOT_DTRACE(x) | |
31 | |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
32 // Work around dtrace tail call bug 6672627 until it is fixed in solaris 10. |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
33 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
34 do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
35 |
0 | 36 #else // ndef SOLARIS || ndef DTRACE_ENABLED |
37 | |
38 #define DTRACE_ONLY(x) | |
39 #define NOT_DTRACE(x) x | |
40 | |
41 #define DTRACE_PROBE(a,b) {;} | |
42 #define DTRACE_PROBE1(a,b,c) {;} | |
43 #define DTRACE_PROBE2(a,b,c,d) {;} | |
44 #define DTRACE_PROBE3(a,b,c,d,e) {;} | |
45 #define DTRACE_PROBE4(a,b,c,d,e,f) {;} | |
46 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} | |
47 | |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
48 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
49 |
0 | 50 #endif |
51 | |
52 #define HS_DTRACE_PROBE_FN(provider,name)\ | |
53 __dtrace_##provider##___##name | |
54 | |
55 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \ | |
56 DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args) | |
57 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \ | |
58 DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args) | |
59 | |
60 /* Dtrace probe declarations */ | |
61 #define HS_DTRACE_PROBE_DECL(provider,name) \ | |
62 HS_DTRACE_PROBE_DECL0(provider,name) | |
63 #define HS_DTRACE_PROBE_DECL0(provider,name)\ | |
64 HS_DTRACE_PROBE_DECL_N(provider,name,(void)) | |
65 #define HS_DTRACE_PROBE_DECL1(provider,name,t0)\ | |
66 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t)) | |
67 #define HS_DTRACE_PROBE_DECL2(provider,name,t0,t1)\ | |
68 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t)) | |
69 #define HS_DTRACE_PROBE_DECL3(provider,name,t0,t1,t2)\ | |
70 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t)) | |
71 #define HS_DTRACE_PROBE_DECL4(provider,name,t0,t1,t2,t3)\ | |
72 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t,\ | |
73 uintptr_t)) | |
74 #define HS_DTRACE_PROBE_DECL5(provider,name,t0,t1,t2,t3,t4)\ | |
75 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
76 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
77 #define HS_DTRACE_PROBE_DECL6(provider,name,t0,t1,t2,t3,t4,t5)\ | |
78 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
79 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
80 #define HS_DTRACE_PROBE_DECL7(provider,name,t0,t1,t2,t3,t4,t5,t6)\ | |
81 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
82 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
83 #define HS_DTRACE_PROBE_DECL8(provider,name,t0,t1,t2,t3,t4,t5,t6,t7)\ | |
84 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
85 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
86 uintptr_t)) | |
87 #define HS_DTRACE_PROBE_DECL9(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8)\ | |
88 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
89 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
90 uintptr_t,uintptr_t)) | |
91 #define HS_DTRACE_PROBE_DECL10(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9)\ | |
92 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
93 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
94 uintptr_t,uintptr_t,uintptr_t)) | |
95 | |
96 /* Dtrace probe definitions */ | |
97 #define HS_DTRACE_PROBE_N(provider,name, args) \ | |
98 DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args) | |
99 | |
100 #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) | |
101 #define HS_DTRACE_PROBE0(provider,name)\ | |
102 HS_DTRACE_PROBE_N(provider,name,()) | |
103 #define HS_DTRACE_PROBE1(provider,name,a0)\ | |
104 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0)) | |
105 #define HS_DTRACE_PROBE2(provider,name,a0,a1)\ | |
106 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1)) | |
107 #define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\ | |
108 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2)) | |
109 #define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\ | |
110 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
111 (uintptr_t)a3)) | |
112 #define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\ | |
113 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
114 (uintptr_t)a3,(uintptr_t)a4)) | |
115 #define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\ | |
116 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
117 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5)) | |
118 #define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\ | |
119 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
120 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6)) | |
121 #define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\ | |
122 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
123 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7)) | |
124 #define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\ | |
125 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
126 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ | |
127 (uintptr_t)a8)) | |
128 #define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\ | |
129 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
130 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ | |
131 (uintptr_t)a8,(uintptr_t)a9)) |