Skip to content

Commit b53554f

Browse files
author
Rickard Bäckman
committed
Merge
2 parents 3215668 + 32c6af3 commit b53554f

File tree

4 files changed

+435
-283
lines changed

4 files changed

+435
-283
lines changed

src/hotspot/cpu/x86/continuation_x86.inline.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ FreezeFnT ContinuationHelper::freeze_stub(const FrameT& f) {
135135
#endif
136136

137137
FreezeFnT f_fn = (FreezeFnT)f.oop_map()->freeze_stub();
138-
if ((void*)f_fn == (void*)f.oop_map()) {
139-
f_fn = NULL; // need CompressedOops for now ????
140-
}
141138
#ifdef CONT_DOUBLE_NOP
142139
// we currently patch explicitly, based on ConfigT etc.
143140
// if (LIKELY(nop != NULL && f_fn != NULL && !nop->is_mode2())) {
@@ -169,9 +166,6 @@ ThawFnT ContinuationHelper::thaw_stub(const FrameT& f) {
169166
}
170167
#endif
171168
ThawFnT t_fn = (ThawFnT)f.oop_map()->thaw_stub();
172-
if ((void*)t_fn == (void*)f.oop_map()) {
173-
t_fn = NULL; // need CompressedOops for now ????
174-
}
175169
return t_fn;
176170
}
177171

src/hotspot/share/compiler/oopMap.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,17 @@ OopMapValue* ExplodedOopMap::copyOopMapValues(const ImmutableOopMap* oopMap, int
529529
void ImmutableOopMap::generate_stub(const CodeBlob* cb) const {
530530
/* The address of the ImmutableOopMap is put into the _freeze_stub and _thaw_stub
531531
* if we can't generate the stub for some reason */
532-
if (_freeze_stub == NULL) {
532+
address default_value = Continuations::default_freeze_oops_stub();
533+
address slow_value = Continuations::freeze_oops_slow();
534+
535+
assert(default_value != slow_value, "should not reach here!");
536+
537+
if (_freeze_stub == default_value) {
533538
OopMapStubGenerator cgen(cb, *this);
534-
if (Atomic::cmpxchg((address) this, &_freeze_stub, (address) NULL) == NULL) {
539+
// lock this by putting the slow path in place
540+
if (Atomic::cmpxchg(slow_value, &_freeze_stub, default_value) == default_value) {
535541
if (!cgen.generate()) {
536-
Atomic::store((address) this, &_thaw_stub);
542+
Atomic::store((address) Continuations::thaw_oops_slow(), &_thaw_stub);
537543
cgen.free();
538544
return;
539545
}
@@ -833,7 +839,7 @@ const ImmutableOopMap* ImmutableOopMapSet::find_map_at_offset(int pc_offset) con
833839
return last->get_from(this);
834840
}
835841

836-
ImmutableOopMap::ImmutableOopMap(const OopMap* oopmap) : _exploded(NULL), _freeze_stub(NULL), _thaw_stub(NULL), _count(oopmap->count()), _num_oops(oopmap->num_oops()) {
842+
ImmutableOopMap::ImmutableOopMap(const OopMap* oopmap) : _exploded(NULL), _freeze_stub(Continuations::default_freeze_oops_stub()), _thaw_stub(Continuations::default_thaw_oops_stub()), _count(oopmap->count()), _num_oops(oopmap->num_oops()) {
837843
_num_oops = oopmap->num_oops();
838844
address addr = data_addr();
839845
//oopmap->copy_data_to(addr);

0 commit comments

Comments
 (0)