annotate src/share/vm/utilities/dtrace.hpp @ 14662:3c3953fb3f2a

8033380: Experimental VM flag to enforce access atomicity Summary: -XX:+AlwaysAtomicAccesses to unconditionally enforce the access atomicity. Reviewed-by: roland, kvn, iveresov
author shade
date Mon, 03 Mar 2014 15:54:45 +0400
parents e6195383bcaf
children 4ca6dc0799b6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
6837
75982791ddb6 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.
coleenp
parents: 4006
diff changeset
2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
75982791ddb6 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.
coleenp
parents: 4006
diff changeset
3 * Copyright (c) 2009, 2012 Red Hat, Inc.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
5 *
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
8 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
9 *
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
14 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
15 *
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
19 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1547
diff changeset
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1547
diff changeset
21 * 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
22 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
23 *
a61af66fc99e Initial load
duke
parents:
diff changeset
24 */
a61af66fc99e Initial load
duke
parents:
diff changeset
25
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #ifndef SHARE_VM_UTILITIES_DTRACE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27 #define SHARE_VM_UTILITIES_DTRACE_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
29 #if defined(DTRACE_ENABLED)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 #include <sys/sdt.h>
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 #define DTRACE_ONLY(x) x
a61af66fc99e Initial load
duke
parents:
diff changeset
34 #define NOT_DTRACE(x)
a61af66fc99e Initial load
duke
parents:
diff changeset
35
6837
75982791ddb6 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.
coleenp
parents: 4006
diff changeset
36 #if defined(SOLARIS)
1547
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 0
diff changeset
37 // 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
38 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \
fb1a39993f69 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 0
diff changeset
39 do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0)
14319
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
40 #elif defined(LINUX)
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
41 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
42 #elif defined(__APPLE__)
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
43 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
44 #include <sys/types.h>
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
45 #else
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
46 #error "dtrace enabled for unknown os"
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
47 #endif /* defined(SOLARIS) */
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
48
14278
a3ba776d6ab6 8030812: Change the solaris DTrace implementation to use USDT2 instead of USDT1
sla
parents: 6837
diff changeset
49 #include "dtracefiles/hotspot.h"
a3ba776d6ab6 8030812: Change the solaris DTrace implementation to use USDT2 instead of USDT1
sla
parents: 6837
diff changeset
50 #include "dtracefiles/hotspot_jni.h"
a3ba776d6ab6 8030812: Change the solaris DTrace implementation to use USDT2 instead of USDT1
sla
parents: 6837
diff changeset
51 #include "dtracefiles/hs_private.h"
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
52
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
53 #else /* defined(DTRACE_ENABLED) */
0
a61af66fc99e Initial load
duke
parents:
diff changeset
54
a61af66fc99e Initial load
duke
parents:
diff changeset
55 #define DTRACE_ONLY(x)
a61af66fc99e Initial load
duke
parents:
diff changeset
56 #define NOT_DTRACE(x) x
a61af66fc99e Initial load
duke
parents:
diff changeset
57
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
58 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
59
14380
e6195383bcaf 8034080: Remove the USDT1 dtrace code from Hotspot
sla
parents: 14319
diff changeset
60 #include "dtrace_disabled.hpp"
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
61
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
62 #endif /* defined(DTRACE_ENABLED) */
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 1972
diff changeset
63
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
64 #endif // SHARE_VM_UTILITIES_DTRACE_HPP