Mercurial > hg > truffle
annotate src/share/vm/utilities/dtrace.hpp @ 4939:45a1bf98f1bb
7141329: Strange values of stack_size in -XX:+TraceMethodHandles output
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Mon, 13 Feb 2012 02:29:22 -0800 |
parents | 436b4a3231bf |
children | 75982791ddb6 |
rev | line source |
---|---|
0 | 1 /* |
1972 | 2 * Copyright (c) 2005, 2010, 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 | |
1972 | 25 #ifndef SHARE_VM_UTILITIES_DTRACE_HPP |
26 #define SHARE_VM_UTILITIES_DTRACE_HPP | |
27 | |
4006 | 28 #if defined(DTRACE_ENABLED) |
0 | 29 |
30 #include <sys/sdt.h> | |
31 | |
32 #define DTRACE_ONLY(x) x | |
33 #define NOT_DTRACE(x) | |
34 | |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
35 // 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
|
36 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
37 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
|
38 |
4006 | 39 #if defined(SOLARIS) |
40 #define USDT1 1 | |
41 #elif defined(__APPLE__) | |
42 #define USDT2 1 | |
43 #include <sys/types.h> | |
44 #include "dtracefiles/hotspot.h" | |
45 #include "dtracefiles/hotspot_jni.h" | |
46 #include "dtracefiles/hs_private.h" | |
47 #else | |
48 #error "dtrace enabled for unknown os" | |
49 #endif /* defined(SOLARIS) */ | |
50 | |
51 #else /* defined(DTRACE_ENABLED) */ | |
0 | 52 |
53 #define DTRACE_ONLY(x) | |
54 #define NOT_DTRACE(x) x | |
55 | |
4006 | 56 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() |
57 | |
58 #ifndef USDT2 | |
59 | |
0 | 60 #define DTRACE_PROBE(a,b) {;} |
61 #define DTRACE_PROBE1(a,b,c) {;} | |
62 #define DTRACE_PROBE2(a,b,c,d) {;} | |
63 #define DTRACE_PROBE3(a,b,c,d,e) {;} | |
64 #define DTRACE_PROBE4(a,b,c,d,e,f) {;} | |
65 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} | |
66 | |
4006 | 67 #else /* USDT2 */ |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
68 |
4006 | 69 #include "dtrace_usdt2_disabled.hpp" |
70 #endif /* USDT2 */ | |
71 | |
72 #endif /* defined(DTRACE_ENABLED) */ | |
73 | |
74 #ifndef USDT2 | |
0 | 75 |
76 #define HS_DTRACE_PROBE_FN(provider,name)\ | |
77 __dtrace_##provider##___##name | |
78 | |
79 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \ | |
80 DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args) | |
81 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \ | |
82 DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args) | |
83 | |
84 /* Dtrace probe declarations */ | |
85 #define HS_DTRACE_PROBE_DECL(provider,name) \ | |
86 HS_DTRACE_PROBE_DECL0(provider,name) | |
87 #define HS_DTRACE_PROBE_DECL0(provider,name)\ | |
88 HS_DTRACE_PROBE_DECL_N(provider,name,(void)) | |
89 #define HS_DTRACE_PROBE_DECL1(provider,name,t0)\ | |
90 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t)) | |
91 #define HS_DTRACE_PROBE_DECL2(provider,name,t0,t1)\ | |
92 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t)) | |
93 #define HS_DTRACE_PROBE_DECL3(provider,name,t0,t1,t2)\ | |
94 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t)) | |
95 #define HS_DTRACE_PROBE_DECL4(provider,name,t0,t1,t2,t3)\ | |
96 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t,\ | |
97 uintptr_t)) | |
98 #define HS_DTRACE_PROBE_DECL5(provider,name,t0,t1,t2,t3,t4)\ | |
99 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
100 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
101 #define HS_DTRACE_PROBE_DECL6(provider,name,t0,t1,t2,t3,t4,t5)\ | |
102 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
103 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
104 #define HS_DTRACE_PROBE_DECL7(provider,name,t0,t1,t2,t3,t4,t5,t6)\ | |
105 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
106 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
107 #define HS_DTRACE_PROBE_DECL8(provider,name,t0,t1,t2,t3,t4,t5,t6,t7)\ | |
108 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
109 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
110 uintptr_t)) | |
111 #define HS_DTRACE_PROBE_DECL9(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8)\ | |
112 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
113 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
114 uintptr_t,uintptr_t)) | |
115 #define HS_DTRACE_PROBE_DECL10(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9)\ | |
116 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
117 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
118 uintptr_t,uintptr_t,uintptr_t)) | |
119 | |
120 /* Dtrace probe definitions */ | |
121 #define HS_DTRACE_PROBE_N(provider,name, args) \ | |
122 DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args) | |
123 | |
124 #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) | |
125 #define HS_DTRACE_PROBE0(provider,name)\ | |
126 HS_DTRACE_PROBE_N(provider,name,()) | |
127 #define HS_DTRACE_PROBE1(provider,name,a0)\ | |
128 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0)) | |
129 #define HS_DTRACE_PROBE2(provider,name,a0,a1)\ | |
130 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1)) | |
131 #define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\ | |
132 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2)) | |
133 #define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\ | |
134 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
135 (uintptr_t)a3)) | |
136 #define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\ | |
137 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
138 (uintptr_t)a3,(uintptr_t)a4)) | |
139 #define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\ | |
140 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
141 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5)) | |
142 #define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\ | |
143 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
144 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6)) | |
145 #define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\ | |
146 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
147 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7)) | |
148 #define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\ | |
149 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
150 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ | |
151 (uintptr_t)a8)) | |
152 #define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\ | |
153 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
154 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ | |
155 (uintptr_t)a8,(uintptr_t)a9)) | |
1972 | 156 |
4006 | 157 #endif /* !USDT2 */ |
158 | |
1972 | 159 #endif // SHARE_VM_UTILITIES_DTRACE_HPP |