author | chegar |
Thu, 17 Oct 2019 20:54:25 +0100 | |
branch | datagramsocketimpl-branch |
changeset 58679 | 9c3209ff7550 |
parent 58678 | 9cf78a70fa4f |
parent 58229 | 722a19a45994 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
53156 | 2 |
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4584
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4584
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4584
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12379
diff
changeset
|
26 |
#include "classfile/altHashing.hpp" |
29081
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
27 |
#include "classfile/javaClasses.inline.hpp" |
52062
8dbf1a13af49
8206009: Move CDS java heap object archiving code to heapShared.hpp and heapShared.cpp
jiangli
parents:
52014
diff
changeset
|
28 |
#include "memory/heapShared.inline.hpp" |
37248 | 29 |
#include "memory/resourceArea.hpp" |
54786 | 30 |
#include "memory/universe.hpp" |
49592
77fb0be7d19f
8199946: Move load/store and encode/decode out of oopDesc
stefank
parents:
47998
diff
changeset
|
31 |
#include "oops/access.inline.hpp" |
54780
f8d182aedc92
8223136: Move compressed oops functions to CompressedOops class
stefank
parents:
54377
diff
changeset
|
32 |
#include "oops/compressedOops.inline.hpp" |
7397 | 33 |
#include "oops/oop.inline.hpp" |
29084
1b732f2836ce
8073387: Move VerifyOopClosures out from genOopClosures.hpp
stefank
parents:
29081
diff
changeset
|
34 |
#include "oops/verifyOopClosure.hpp" |
7397 | 35 |
#include "runtime/handles.inline.hpp" |
14583
d70ee55535f4
8003935: Simplify the needed includes for using Thread::current()
stefank
parents:
13728
diff
changeset
|
36 |
#include "runtime/thread.inline.hpp" |
7397 | 37 |
#include "utilities/copy.hpp" |
58015
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
38 |
#include "utilities/macros.hpp" |
1 | 39 |
|
40 |
void oopDesc::print_on(outputStream* st) const { |
|
51268
4ac20e5f96ce
8202171: Some oopDesc functions compare this with NULL
hseigel
parents:
50056
diff
changeset
|
41 |
klass()->oop_print_on(oop(this), st); |
1 | 42 |
} |
43 |
||
44 |
void oopDesc::print_address_on(outputStream* st) const { |
|
37190
09d719d466a6
8146947: Remove PrintOopAddress rather than converting to UL
rprotacio
parents:
33611
diff
changeset
|
45 |
st->print("{" INTPTR_FORMAT "}", p2i(this)); |
09d719d466a6
8146947: Remove PrintOopAddress rather than converting to UL
rprotacio
parents:
33611
diff
changeset
|
46 |
|
1 | 47 |
} |
48 |
||
49 |
void oopDesc::print() { print_on(tty); } |
|
50 |
||
51 |
void oopDesc::print_address() { print_address_on(tty); } |
|
52 |
||
53 |
char* oopDesc::print_string() { |
|
4584
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
54 |
stringStream st; |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
55 |
print_on(&st); |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
56 |
return st.as_string(); |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
57 |
} |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
58 |
|
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
59 |
void oopDesc::print_value() { |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
60 |
print_value_on(tty); |
1 | 61 |
} |
62 |
||
63 |
char* oopDesc::print_value_string() { |
|
4584
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
64 |
char buf[100]; |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
65 |
stringStream st(buf, sizeof(buf)); |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
66 |
print_value_on(&st); |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
67 |
return st.as_string(); |
1 | 68 |
} |
69 |
||
4584
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
70 |
void oopDesc::print_value_on(outputStream* st) const { |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
71 |
oop obj = oop(this); |
51268
4ac20e5f96ce
8202171: Some oopDesc functions compare this with NULL
hseigel
parents:
50056
diff
changeset
|
72 |
if (java_lang_String::is_instance(obj)) { |
4584
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
73 |
java_lang_String::print(obj, st); |
37190
09d719d466a6
8146947: Remove PrintOopAddress rather than converting to UL
rprotacio
parents:
33611
diff
changeset
|
74 |
print_address_on(st); |
4584
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
75 |
} else { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12379
diff
changeset
|
76 |
klass()->oop_print_value_on(obj, st); |
4584
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
77 |
} |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
78 |
} |
e2a449e8cc6f
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
2332
diff
changeset
|
79 |
|
1 | 80 |
|
51268
4ac20e5f96ce
8202171: Some oopDesc functions compare this with NULL
hseigel
parents:
50056
diff
changeset
|
81 |
void oopDesc::verify_on(outputStream* st, oopDesc* oop_desc) { |
4ac20e5f96ce
8202171: Some oopDesc functions compare this with NULL
hseigel
parents:
50056
diff
changeset
|
82 |
if (oop_desc != NULL) { |
4ac20e5f96ce
8202171: Some oopDesc functions compare this with NULL
hseigel
parents:
50056
diff
changeset
|
83 |
oop_desc->klass()->oop_verify_on(oop_desc, st); |
1 | 84 |
} |
85 |
} |
|
86 |
||
87 |
||
51268
4ac20e5f96ce
8202171: Some oopDesc functions compare this with NULL
hseigel
parents:
50056
diff
changeset
|
88 |
void oopDesc::verify(oopDesc* oop_desc) { |
4ac20e5f96ce
8202171: Some oopDesc functions compare this with NULL
hseigel
parents:
50056
diff
changeset
|
89 |
verify_on(tty, oop_desc); |
1 | 90 |
} |
91 |
||
92 |
intptr_t oopDesc::slow_identity_hash() { |
|
93 |
// slow case; we have to acquire the micro lock in order to locate the header |
|
46271
979ebd346ecf
8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents:
37248
diff
changeset
|
94 |
Thread* THREAD = Thread::current(); |
1 | 95 |
ResetNoHandleMark rnm; // Might be called from LEAF/QUICK ENTRY |
46271
979ebd346ecf
8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents:
37248
diff
changeset
|
96 |
HandleMark hm(THREAD); |
979ebd346ecf
8169881: Remove implicit Handle conversions oop->Handle
coleenp
parents:
37248
diff
changeset
|
97 |
Handle object(THREAD, this); |
1 | 98 |
return ObjectSynchronizer::identity_hash_value_for(object); |
99 |
} |
|
100 |
||
46968
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
101 |
// used only for asserts and guarantees |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
102 |
bool oopDesc::is_oop(oop obj, bool ignore_mark_word) { |
49851 | 103 |
if (!Universe::heap()->is_oop(obj)) { |
104 |
return false; |
|
105 |
} |
|
46968
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
106 |
|
57777
90ead0febf56
8229258: Rework markOop and markOopDesc into a simpler mark word value carrier
stefank
parents:
54842
diff
changeset
|
107 |
// Header verification: the mark is typically non-zero. If we're |
90ead0febf56
8229258: Rework markOop and markOopDesc into a simpler mark word value carrier
stefank
parents:
54842
diff
changeset
|
108 |
// at a safepoint, it must not be zero. |
46968
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
109 |
// Outside of a safepoint, the header could be changing (for example, |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
110 |
// another thread could be inflating a lock on this object). |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
111 |
if (ignore_mark_word) { |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
112 |
return true; |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
113 |
} |
57777
90ead0febf56
8229258: Rework markOop and markOopDesc into a simpler mark word value carrier
stefank
parents:
54842
diff
changeset
|
114 |
if (obj->mark_raw().value() != 0) { |
46968
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
115 |
return true; |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
116 |
} |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
117 |
return !SafepointSynchronize::is_at_safepoint(); |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
118 |
} |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
119 |
|
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
120 |
// used only for asserts and guarantees |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
121 |
bool oopDesc::is_oop_or_null(oop obj, bool ignore_mark_word) { |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
122 |
return obj == NULL ? true : is_oop(obj, ignore_mark_word); |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
123 |
} |
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
124 |
|
1 | 125 |
VerifyOopClosure VerifyOopClosure::verify_oop; |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
126 |
|
29084
1b732f2836ce
8073387: Move VerifyOopClosures out from genOopClosures.hpp
stefank
parents:
29081
diff
changeset
|
127 |
template <class T> void VerifyOopClosure::do_oop_work(T* p) { |
49592
77fb0be7d19f
8199946: Move load/store and encode/decode out of oopDesc
stefank
parents:
47998
diff
changeset
|
128 |
oop obj = RawAccess<>::oop_load(p); |
46968
9119841280f4
8160399: is_oop_or_null involves undefined behavior
coleenp
parents:
46810
diff
changeset
|
129 |
guarantee(oopDesc::is_oop_or_null(obj), "invalid oop: " INTPTR_FORMAT, p2i((oopDesc*) obj)); |
29084
1b732f2836ce
8073387: Move VerifyOopClosures out from genOopClosures.hpp
stefank
parents:
29081
diff
changeset
|
130 |
} |
1b732f2836ce
8073387: Move VerifyOopClosures out from genOopClosures.hpp
stefank
parents:
29081
diff
changeset
|
131 |
|
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
132 |
void VerifyOopClosure::do_oop(oop* p) { VerifyOopClosure::do_oop_work(p); } |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
1
diff
changeset
|
133 |
void VerifyOopClosure::do_oop(narrowOop* p) { VerifyOopClosure::do_oop_work(p); } |
29081
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
134 |
|
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
135 |
// type test operations that doesn't require inclusion of oop.inline.hpp. |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
136 |
bool oopDesc::is_instance_noinline() const { return is_instance(); } |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
137 |
bool oopDesc::is_array_noinline() const { return is_array(); } |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
138 |
bool oopDesc::is_objArray_noinline() const { return is_objArray(); } |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
139 |
bool oopDesc::is_typeArray_noinline() const { return is_typeArray(); } |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
140 |
|
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
141 |
bool oopDesc::has_klass_gap() { |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
142 |
// Only has a klass gap when compressed class pointers are used. |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
143 |
return UseCompressedClassPointers; |
c61eb4914428
8072911: Remove includes of oop.inline.hpp from .hpp files
stefank
parents:
24424
diff
changeset
|
144 |
} |
46810
7dad333205cd
8179302: Pre-resolve constant pool string entries and cache resolved_reference arrays in CDS archive.
jiangli
parents:
46271
diff
changeset
|
145 |
|
52014
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
146 |
void* oopDesc::load_klass_raw(oop obj) { |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
147 |
if (UseCompressedClassPointers) { |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
148 |
narrowKlass narrow_klass = *(obj->compressed_klass_addr()); |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
149 |
if (narrow_klass == 0) return NULL; |
54780
f8d182aedc92
8223136: Move compressed oops functions to CompressedOops class
stefank
parents:
54377
diff
changeset
|
150 |
return (void*)CompressedKlassPointers::decode_raw(narrow_klass); |
52014
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
151 |
} else { |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
152 |
return *(void**)(obj->klass_addr()); |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
153 |
} |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
154 |
} |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
155 |
|
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
156 |
void* oopDesc::load_oop_raw(oop obj, int offset) { |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
157 |
uintptr_t addr = (uintptr_t)(void*)obj + (uint)offset; |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
158 |
if (UseCompressedOops) { |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
159 |
narrowOop narrow_oop = *(narrowOop*)addr; |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
160 |
if (narrow_oop == 0) return NULL; |
54780
f8d182aedc92
8223136: Move compressed oops functions to CompressedOops class
stefank
parents:
54377
diff
changeset
|
161 |
return (void*)CompressedOops::decode_raw(narrow_oop); |
52014
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
162 |
} else { |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
163 |
return *(void**)addr; |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
164 |
} |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
165 |
} |
1aa9beac610e
8210754: print_location is not reliable enough (printing register info)
mdoerr
parents:
51796
diff
changeset
|
166 |
|
47998
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
167 |
oop oopDesc::obj_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::oop_load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
168 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
169 |
void oopDesc::obj_field_put_raw(int offset, oop value) { RawAccess<>::oop_store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
170 |
void oopDesc::release_obj_field_put(int offset, oop value) { HeapAccess<MO_RELEASE>::oop_store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
171 |
void oopDesc::obj_field_put_volatile(int offset, oop value) { HeapAccess<MO_SEQ_CST>::oop_store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
172 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
173 |
address oopDesc::address_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
174 |
address oopDesc::address_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
175 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
176 |
void oopDesc::address_field_put(int offset, address value) { HeapAccess<>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
177 |
void oopDesc::release_address_field_put(int offset, address value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
178 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
179 |
Metadata* oopDesc::metadata_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); } |
51516
7c3891b9f1e0
8206457: Code paths from oop_iterate() must use barrier-free access
rkennke
parents:
51268
diff
changeset
|
180 |
Metadata* oopDesc::metadata_field_raw(int offset) const { return RawAccess<>::load_at(as_oop(), offset); } |
47998
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
181 |
void oopDesc::metadata_field_put(int offset, Metadata* value) { HeapAccess<>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
182 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
183 |
Metadata* oopDesc::metadata_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
184 |
void oopDesc::release_metadata_field_put(int offset, Metadata* value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
185 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
186 |
jbyte oopDesc::byte_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
187 |
void oopDesc::release_byte_field_put(int offset, jbyte value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
188 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
189 |
jchar oopDesc::char_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
190 |
void oopDesc::release_char_field_put(int offset, jchar value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
191 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
192 |
jboolean oopDesc::bool_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
193 |
void oopDesc::release_bool_field_put(int offset, jboolean value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, jboolean(value & 1)); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
194 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
195 |
jint oopDesc::int_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
196 |
void oopDesc::release_int_field_put(int offset, jint value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
197 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
198 |
jshort oopDesc::short_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
199 |
void oopDesc::release_short_field_put(int offset, jshort value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
200 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
201 |
jlong oopDesc::long_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
202 |
void oopDesc::release_long_field_put(int offset, jlong value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
203 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
204 |
jfloat oopDesc::float_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
205 |
void oopDesc::release_float_field_put(int offset, jfloat value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
206 |
|
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
207 |
jdouble oopDesc::double_field_acquire(int offset) const { return HeapAccess<MO_ACQUIRE>::load_at(as_oop(), offset); } |
fb0275c320a0
8189871: Refactor GC barriers to use declarative semantics
eosterlund
parents:
47216
diff
changeset
|
208 |
void oopDesc::release_double_field_put(int offset, jdouble value) { HeapAccess<MO_RELEASE>::store_at(as_oop(), offset, value); } |
58015
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
209 |
|
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
210 |
#ifdef ASSERT |
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
211 |
void oopDesc::verify_forwardee(oop forwardee) { |
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
212 |
#if INCLUDE_CDS_JAVA_HEAP |
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
213 |
assert(!HeapShared::is_archived_object(forwardee) && !HeapShared::is_archived_object(this), |
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
214 |
"forwarding archive object"); |
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
215 |
#endif |
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
216 |
} |
dd84de796f2c
8224815: Remove non-GC uses of CollectedHeap::is_in_reserved()
eosterlund
parents:
57903
diff
changeset
|
217 |
#endif |