Skip to content

Commit ea2d2df

Browse files
committed
remove barriers
1 parent 70e7861 commit ea2d2df

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/hotspot/cpu/s390/javaFrameAnchor_s390.hpp

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,38 +35,32 @@
3535
// 3 - restoring an old state (javaCalls).
3636

3737
inline void clear(void) {
38+
// No hardware barriers are necessary. All members are volatile and the profiler
39+
// is run from a signal handler and only observers the thread its running on.
40+
3841
// Clearing _last_Java_sp must be first.
39-
OrderAccess::release();
42+
4043
_last_Java_sp = nullptr;
41-
// Fence?
42-
OrderAccess::fence();
4344

4445
_last_Java_pc = nullptr;
4546
}
4647

4748
inline void set(intptr_t* sp, address pc) {
4849
_last_Java_pc = pc;
49-
50-
OrderAccess::release();
5150
_last_Java_sp = sp;
5251
}
5352

5453
void copy(JavaFrameAnchor* src) {
55-
// In order to make sure the transition state is valid for "this"
54+
// No hardware barriers are necessary. All members are volatile and the profiler
55+
// is run from a signal handler and only observers the thread its running on.
56+
5657
// we must clear _last_Java_sp before copying the rest of the new data.
57-
// Hack Alert: Temporary bugfix for 4717480/4721647
58-
// To act like previous version (pd_cache_state) don't null _last_Java_sp
59-
// unless the value is changing.
60-
//
6158
if (_last_Java_sp != src->_last_Java_sp) {
62-
OrderAccess::release();
6359
_last_Java_sp = nullptr;
64-
OrderAccess::fence();
6560
}
6661
_last_Java_pc = src->_last_Java_pc;
6762
// Must be last so profiler will always see valid frame if has_last_frame() is true.
6863

69-
OrderAccess::release();
7064
_last_Java_sp = src->_last_Java_sp;
7165
}
7266

@@ -80,7 +74,7 @@
8074
intptr_t* last_Java_fp(void) { return nullptr; }
8175

8276
intptr_t* last_Java_sp() const { return _last_Java_sp; }
83-
void set_last_Java_sp(intptr_t* sp) { OrderAccess::release(); _last_Java_sp = sp; }
77+
void set_last_Java_sp(intptr_t* sp) { _last_Java_sp = sp; }
8478

8579
address last_Java_pc(void) { return _last_Java_pc; }
8680

0 commit comments

Comments
 (0)