Mercurial > hg > truffle
comparison src/share/vm/opto/graphKit.cpp @ 17780:606acabe7b5c
8031320: Use Intel RTM instructions for locks
Summary: Use RTM for inflated locks and stack locks.
Reviewed-by: iveresov, twisti, roland, dcubed
author | kvn |
---|---|
date | Thu, 20 Mar 2014 17:49:27 -0700 |
parents | 9ab9f254cfe2 |
children | 62c54fcc0a35 |
comparison
equal
deleted
inserted
replaced
17778:a48e16541e6b | 17780:606acabe7b5c |
---|---|
3155 // Box the stack location | 3155 // Box the stack location |
3156 Node* box = _gvn.transform(new (C) BoxLockNode(next_monitor())); | 3156 Node* box = _gvn.transform(new (C) BoxLockNode(next_monitor())); |
3157 Node* mem = reset_memory(); | 3157 Node* mem = reset_memory(); |
3158 | 3158 |
3159 FastLockNode * flock = _gvn.transform(new (C) FastLockNode(0, obj, box) )->as_FastLock(); | 3159 FastLockNode * flock = _gvn.transform(new (C) FastLockNode(0, obj, box) )->as_FastLock(); |
3160 if (PrintPreciseBiasedLockingStatistics) { | 3160 if (UseBiasedLocking && PrintPreciseBiasedLockingStatistics) { |
3161 // Create the counters for this fast lock. | 3161 // Create the counters for this fast lock. |
3162 flock->create_lock_counter(sync_jvms()); // sync_jvms used to get current bci | 3162 flock->create_lock_counter(sync_jvms()); // sync_jvms used to get current bci |
3163 } | 3163 } |
3164 | |
3165 // Create the rtm counters for this fast lock if needed. | |
3166 flock->create_rtm_lock_counter(sync_jvms()); // sync_jvms used to get current bci | |
3167 | |
3164 // Add monitor to debug info for the slow path. If we block inside the | 3168 // Add monitor to debug info for the slow path. If we block inside the |
3165 // slow path and de-opt, we need the monitor hanging around | 3169 // slow path and de-opt, we need the monitor hanging around |
3166 map()->push_monitor( flock ); | 3170 map()->push_monitor( flock ); |
3167 | 3171 |
3168 const TypeFunc *tf = LockNode::lock_type(); | 3172 const TypeFunc *tf = LockNode::lock_type(); |