-
Notifications
You must be signed in to change notification settings - Fork 6.3k
8369190: JavaFrameAnchor on AArch64 has unnecessary barriers and wrong store order in MacroAssembler #27645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
8369190: JavaFrameAnchor on AArch64 has unnecessary barriers and wrong store order in MacroAssembler #27645
Changes from 2 commits
462c63e
a0058eb
a141449
253417f
016769d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,8 @@ | |
// 3 - restoring an old state (javaCalls) | ||
|
||
void clear(void) { | ||
// clearing _last_Java_sp must be first | ||
// Must clear sp first and place a store-store barrier (dmb ISHST) immediately after, | ||
// to ensure ACGT does not observe a corrupted frame. | ||
_last_Java_sp = nullptr; | ||
OrderAccess::release(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You still need a compiler fence here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe not, if this is the same thread as readers. I don't know what it's for. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
_last_Java_fp = nullptr; | ||
|
@@ -54,14 +55,21 @@ | |
// To act like previous version (pd_cache_state) don't null _last_Java_sp | ||
// unless the value is changing | ||
// | ||
if (_last_Java_sp != src->_last_Java_sp) { | ||
bool different_sp = _last_Java_sp != src->_last_Java_sp; | ||
if (different_sp) { | ||
// Must clear sp first and place a store-store barrier (dmb ISHST) immediately after, | ||
// to ensure ACGT does not observe a corrupted frame. | ||
_last_Java_sp = nullptr; | ||
OrderAccess::release(); | ||
} | ||
_last_Java_fp = src->_last_Java_fp; | ||
_last_Java_pc = src->_last_Java_pc; | ||
// Must be last so profiler will always see valid frame if has_last_frame() is true | ||
_last_Java_sp = src->_last_Java_sp; | ||
if (different_sp) { | ||
// Must set sp last and place a store-store barrier (dmb ISHST) immediately before, | ||
// to ensure ACGT does not observe a corrupted frame. | ||
OrderAccess::release(); | ||
_last_Java_sp = src->_last_Java_sp; | ||
} | ||
} | ||
|
||
bool walkable(void) { return _last_Java_sp != nullptr && _last_Java_pc != nullptr; } | ||
|
Uh oh!
There was an error while loading. Please reload this page.