mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8184271: Time related C1 intrinsics produce inconsistent results when floating around
C1 intrinsics for System.nanoTime(), System.currentTimeMillis() and JVM.counterTime() should be pinned. Reviewed-by: kvn, vlivanov
This commit is contained in:
parent
0a8e98f6c4
commit
9098aa9a2e
4 changed files with 85 additions and 1 deletions
|
@ -399,6 +399,21 @@ bool vmIntrinsics::can_trap(vmIntrinsics::ID id) {
|
|||
}
|
||||
}
|
||||
|
||||
// Some intrinsics produce different results if they are not pinned
|
||||
bool vmIntrinsics::should_be_pinned(vmIntrinsics::ID id) {
|
||||
assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
|
||||
switch(id) {
|
||||
#ifdef TRACE_HAVE_INTRINSICS
|
||||
case vmIntrinsics::_counterTime:
|
||||
#endif
|
||||
case vmIntrinsics::_currentTimeMillis:
|
||||
case vmIntrinsics::_nanoTime:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool vmIntrinsics::does_virtual_dispatch(vmIntrinsics::ID id) {
|
||||
assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
|
||||
switch(id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue