Mercurial > hg > truffle
annotate src/share/vm/utilities/dtrace.hpp @ 2645:b2c1e959be46
Clean up around BlockBegin / StdEntry.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 11 May 2011 14:34:29 +0200 |
parents | f95d63e2154a |
children | 436b4a3231bf |
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 | |
0 | 28 #if defined(SOLARIS) && defined(DTRACE_ENABLED) |
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 |
0 | 39 #else // ndef SOLARIS || ndef DTRACE_ENABLED |
40 | |
41 #define DTRACE_ONLY(x) | |
42 #define NOT_DTRACE(x) x | |
43 | |
44 #define DTRACE_PROBE(a,b) {;} | |
45 #define DTRACE_PROBE1(a,b,c) {;} | |
46 #define DTRACE_PROBE2(a,b,c,d) {;} | |
47 #define DTRACE_PROBE3(a,b,c,d,e) {;} | |
48 #define DTRACE_PROBE4(a,b,c,d,e,f) {;} | |
49 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;} | |
50 | |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
51 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
0
diff
changeset
|
52 |
0 | 53 #endif |
54 | |
55 #define HS_DTRACE_PROBE_FN(provider,name)\ | |
56 __dtrace_##provider##___##name | |
57 | |
58 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \ | |
59 DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args) | |
60 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \ | |
61 DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args) | |
62 | |
63 /* Dtrace probe declarations */ | |
64 #define HS_DTRACE_PROBE_DECL(provider,name) \ | |
65 HS_DTRACE_PROBE_DECL0(provider,name) | |
66 #define HS_DTRACE_PROBE_DECL0(provider,name)\ | |
67 HS_DTRACE_PROBE_DECL_N(provider,name,(void)) | |
68 #define HS_DTRACE_PROBE_DECL1(provider,name,t0)\ | |
69 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t)) | |
70 #define HS_DTRACE_PROBE_DECL2(provider,name,t0,t1)\ | |
71 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t)) | |
72 #define HS_DTRACE_PROBE_DECL3(provider,name,t0,t1,t2)\ | |
73 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t)) | |
74 #define HS_DTRACE_PROBE_DECL4(provider,name,t0,t1,t2,t3)\ | |
75 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t,\ | |
76 uintptr_t)) | |
77 #define HS_DTRACE_PROBE_DECL5(provider,name,t0,t1,t2,t3,t4)\ | |
78 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
79 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
80 #define HS_DTRACE_PROBE_DECL6(provider,name,t0,t1,t2,t3,t4,t5)\ | |
81 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
82 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
83 #define HS_DTRACE_PROBE_DECL7(provider,name,t0,t1,t2,t3,t4,t5,t6)\ | |
84 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
85 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t)) | |
86 #define HS_DTRACE_PROBE_DECL8(provider,name,t0,t1,t2,t3,t4,t5,t6,t7)\ | |
87 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
88 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
89 uintptr_t)) | |
90 #define HS_DTRACE_PROBE_DECL9(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8)\ | |
91 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
92 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
93 uintptr_t,uintptr_t)) | |
94 #define HS_DTRACE_PROBE_DECL10(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9)\ | |
95 HS_DTRACE_PROBE_DECL_N(provider,name,(\ | |
96 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\ | |
97 uintptr_t,uintptr_t,uintptr_t)) | |
98 | |
99 /* Dtrace probe definitions */ | |
100 #define HS_DTRACE_PROBE_N(provider,name, args) \ | |
101 DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args) | |
102 | |
103 #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name) | |
104 #define HS_DTRACE_PROBE0(provider,name)\ | |
105 HS_DTRACE_PROBE_N(provider,name,()) | |
106 #define HS_DTRACE_PROBE1(provider,name,a0)\ | |
107 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0)) | |
108 #define HS_DTRACE_PROBE2(provider,name,a0,a1)\ | |
109 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1)) | |
110 #define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\ | |
111 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2)) | |
112 #define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\ | |
113 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
114 (uintptr_t)a3)) | |
115 #define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\ | |
116 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
117 (uintptr_t)a3,(uintptr_t)a4)) | |
118 #define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\ | |
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)) | |
121 #define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\ | |
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)) | |
124 #define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\ | |
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 #define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\ | |
128 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
129 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ | |
130 (uintptr_t)a8)) | |
131 #define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\ | |
132 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\ | |
133 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\ | |
134 (uintptr_t)a8,(uintptr_t)a9)) | |
1972 | 135 |
136 #endif // SHARE_VM_UTILITIES_DTRACE_HPP |