annotate src/share/vm/utilities/dtrace.hpp @ 511:dabd8d202164

4997835: RFE: crash dump will only be created when running w/ -XX:+ShowMessageBoxOnError Summary: Using UseOSErrorReporting will provide both an hs_err file and a crash dump or debug launch and works better. Reviewed-by: xlu, acorn, poonam
author coleenp
date Tue, 23 Dec 2008 06:16:53 -0800
parents a61af66fc99e
children fb1a39993f69
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 #if defined(SOLARIS) && defined(DTRACE_ENABLED)
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 #include <sys/sdt.h>
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 #define DTRACE_ONLY(x) x
a61af66fc99e Initial load
duke
parents:
diff changeset
30 #define NOT_DTRACE(x)
a61af66fc99e Initial load
duke
parents:
diff changeset
31
a61af66fc99e Initial load
duke
parents:
diff changeset
32 #else // ndef SOLARIS || ndef DTRACE_ENABLED
a61af66fc99e Initial load
duke
parents:
diff changeset
33
a61af66fc99e Initial load
duke
parents:
diff changeset
34 #define DTRACE_ONLY(x)
a61af66fc99e Initial load
duke
parents:
diff changeset
35 #define NOT_DTRACE(x) x
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37 #define DTRACE_PROBE(a,b) {;}
a61af66fc99e Initial load
duke
parents:
diff changeset
38 #define DTRACE_PROBE1(a,b,c) {;}
a61af66fc99e Initial load
duke
parents:
diff changeset
39 #define DTRACE_PROBE2(a,b,c,d) {;}
a61af66fc99e Initial load
duke
parents:
diff changeset
40 #define DTRACE_PROBE3(a,b,c,d,e) {;}
a61af66fc99e Initial load
duke
parents:
diff changeset
41 #define DTRACE_PROBE4(a,b,c,d,e,f) {;}
a61af66fc99e Initial load
duke
parents:
diff changeset
42 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
45
a61af66fc99e Initial load
duke
parents:
diff changeset
46 #define HS_DTRACE_PROBE_FN(provider,name)\
a61af66fc99e Initial load
duke
parents:
diff changeset
47 __dtrace_##provider##___##name
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \
a61af66fc99e Initial load
duke
parents:
diff changeset
50 DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args)
a61af66fc99e Initial load
duke
parents:
diff changeset
51 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \
a61af66fc99e Initial load
duke
parents:
diff changeset
52 DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args)
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 /* Dtrace probe declarations */
a61af66fc99e Initial load
duke
parents:
diff changeset
55 #define HS_DTRACE_PROBE_DECL(provider,name) \
a61af66fc99e Initial load
duke
parents:
diff changeset
56 HS_DTRACE_PROBE_DECL0(provider,name)
a61af66fc99e Initial load
duke
parents:
diff changeset
57 #define HS_DTRACE_PROBE_DECL0(provider,name)\
a61af66fc99e Initial load
duke
parents:
diff changeset
58 HS_DTRACE_PROBE_DECL_N(provider,name,(void))
a61af66fc99e Initial load
duke
parents:
diff changeset
59 #define HS_DTRACE_PROBE_DECL1(provider,name,t0)\
a61af66fc99e Initial load
duke
parents:
diff changeset
60 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
61 #define HS_DTRACE_PROBE_DECL2(provider,name,t0,t1)\
a61af66fc99e Initial load
duke
parents:
diff changeset
62 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
63 #define HS_DTRACE_PROBE_DECL3(provider,name,t0,t1,t2)\
a61af66fc99e Initial load
duke
parents:
diff changeset
64 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
65 #define HS_DTRACE_PROBE_DECL4(provider,name,t0,t1,t2,t3)\
a61af66fc99e Initial load
duke
parents:
diff changeset
66 HS_DTRACE_PROBE_DECL_N(provider,name,(uintptr_t,uintptr_t,uintptr_t,\
a61af66fc99e Initial load
duke
parents:
diff changeset
67 uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
68 #define HS_DTRACE_PROBE_DECL5(provider,name,t0,t1,t2,t3,t4)\
a61af66fc99e Initial load
duke
parents:
diff changeset
69 HS_DTRACE_PROBE_DECL_N(provider,name,(\
a61af66fc99e Initial load
duke
parents:
diff changeset
70 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
71 #define HS_DTRACE_PROBE_DECL6(provider,name,t0,t1,t2,t3,t4,t5)\
a61af66fc99e Initial load
duke
parents:
diff changeset
72 HS_DTRACE_PROBE_DECL_N(provider,name,(\
a61af66fc99e Initial load
duke
parents:
diff changeset
73 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
74 #define HS_DTRACE_PROBE_DECL7(provider,name,t0,t1,t2,t3,t4,t5,t6)\
a61af66fc99e Initial load
duke
parents:
diff changeset
75 HS_DTRACE_PROBE_DECL_N(provider,name,(\
a61af66fc99e Initial load
duke
parents:
diff changeset
76 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
77 #define HS_DTRACE_PROBE_DECL8(provider,name,t0,t1,t2,t3,t4,t5,t6,t7)\
a61af66fc99e Initial load
duke
parents:
diff changeset
78 HS_DTRACE_PROBE_DECL_N(provider,name,(\
a61af66fc99e Initial load
duke
parents:
diff changeset
79 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\
a61af66fc99e Initial load
duke
parents:
diff changeset
80 uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
81 #define HS_DTRACE_PROBE_DECL9(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8)\
a61af66fc99e Initial load
duke
parents:
diff changeset
82 HS_DTRACE_PROBE_DECL_N(provider,name,(\
a61af66fc99e Initial load
duke
parents:
diff changeset
83 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\
a61af66fc99e Initial load
duke
parents:
diff changeset
84 uintptr_t,uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
85 #define HS_DTRACE_PROBE_DECL10(provider,name,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9)\
a61af66fc99e Initial load
duke
parents:
diff changeset
86 HS_DTRACE_PROBE_DECL_N(provider,name,(\
a61af66fc99e Initial load
duke
parents:
diff changeset
87 uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,uintptr_t,\
a61af66fc99e Initial load
duke
parents:
diff changeset
88 uintptr_t,uintptr_t,uintptr_t))
a61af66fc99e Initial load
duke
parents:
diff changeset
89
a61af66fc99e Initial load
duke
parents:
diff changeset
90 /* Dtrace probe definitions */
a61af66fc99e Initial load
duke
parents:
diff changeset
91 #define HS_DTRACE_PROBE_N(provider,name, args) \
a61af66fc99e Initial load
duke
parents:
diff changeset
92 DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args)
a61af66fc99e Initial load
duke
parents:
diff changeset
93
a61af66fc99e Initial load
duke
parents:
diff changeset
94 #define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name)
a61af66fc99e Initial load
duke
parents:
diff changeset
95 #define HS_DTRACE_PROBE0(provider,name)\
a61af66fc99e Initial load
duke
parents:
diff changeset
96 HS_DTRACE_PROBE_N(provider,name,())
a61af66fc99e Initial load
duke
parents:
diff changeset
97 #define HS_DTRACE_PROBE1(provider,name,a0)\
a61af66fc99e Initial load
duke
parents:
diff changeset
98 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0))
a61af66fc99e Initial load
duke
parents:
diff changeset
99 #define HS_DTRACE_PROBE2(provider,name,a0,a1)\
a61af66fc99e Initial load
duke
parents:
diff changeset
100 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1))
a61af66fc99e Initial load
duke
parents:
diff changeset
101 #define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\
a61af66fc99e Initial load
duke
parents:
diff changeset
102 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2))
a61af66fc99e Initial load
duke
parents:
diff changeset
103 #define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\
a61af66fc99e Initial load
duke
parents:
diff changeset
104 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
a61af66fc99e Initial load
duke
parents:
diff changeset
105 (uintptr_t)a3))
a61af66fc99e Initial load
duke
parents:
diff changeset
106 #define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\
a61af66fc99e Initial load
duke
parents:
diff changeset
107 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
a61af66fc99e Initial load
duke
parents:
diff changeset
108 (uintptr_t)a3,(uintptr_t)a4))
a61af66fc99e Initial load
duke
parents:
diff changeset
109 #define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\
a61af66fc99e Initial load
duke
parents:
diff changeset
110 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
a61af66fc99e Initial load
duke
parents:
diff changeset
111 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5))
a61af66fc99e Initial load
duke
parents:
diff changeset
112 #define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\
a61af66fc99e Initial load
duke
parents:
diff changeset
113 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
a61af66fc99e Initial load
duke
parents:
diff changeset
114 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6))
a61af66fc99e Initial load
duke
parents:
diff changeset
115 #define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\
a61af66fc99e Initial load
duke
parents:
diff changeset
116 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
a61af66fc99e Initial load
duke
parents:
diff changeset
117 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7))
a61af66fc99e Initial load
duke
parents:
diff changeset
118 #define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
a61af66fc99e Initial load
duke
parents:
diff changeset
119 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
a61af66fc99e Initial load
duke
parents:
diff changeset
120 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\
a61af66fc99e Initial load
duke
parents:
diff changeset
121 (uintptr_t)a8))
a61af66fc99e Initial load
duke
parents:
diff changeset
122 #define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\
a61af66fc99e Initial load
duke
parents:
diff changeset
123 HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
a61af66fc99e Initial load
duke
parents:
diff changeset
124 (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\
a61af66fc99e Initial load
duke
parents:
diff changeset
125 (uintptr_t)a8,(uintptr_t)a9))