mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
8031320: Use Intel RTM instructions for locks
Use RTM for inflated locks and stack locks. Reviewed-by: iveresov, twisti, roland, dcubed
This commit is contained in:
parent
315e4838e9
commit
97a51c5c2a
46 changed files with 1251 additions and 87 deletions
|
@ -3151,10 +3151,14 @@ FastLockNode* GraphKit::shared_lock(Node* obj) {
|
|||
Node* mem = reset_memory();
|
||||
|
||||
FastLockNode * flock = _gvn.transform(new (C) FastLockNode(0, obj, box) )->as_FastLock();
|
||||
if (PrintPreciseBiasedLockingStatistics) {
|
||||
if (UseBiasedLocking && PrintPreciseBiasedLockingStatistics) {
|
||||
// Create the counters for this fast lock.
|
||||
flock->create_lock_counter(sync_jvms()); // sync_jvms used to get current bci
|
||||
}
|
||||
|
||||
// Create the rtm counters for this fast lock if needed.
|
||||
flock->create_rtm_lock_counter(sync_jvms()); // sync_jvms used to get current bci
|
||||
|
||||
// Add monitor to debug info for the slow path. If we block inside the
|
||||
// slow path and de-opt, we need the monitor hanging around
|
||||
map()->push_monitor( flock );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue