mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8073165: Contended Locking fast exit bucket
JEP-143/JDK-8073165 Contended Locking fast exit bucket Co-authored-by: Dave Dice <dave.dice@oracle.com> Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com> Reviewed-by: dholmes, acorn, dice, dcubed
This commit is contained in:
parent
d30de5ab31
commit
884f0d320f
14 changed files with 326 additions and 215 deletions
|
@ -116,9 +116,10 @@ class ObjectSynchronizer : AllStatic {
|
|||
// Basically we deflate all monitors that are not busy.
|
||||
// An adaptive profile-based deflation policy could be used if needed
|
||||
static void deflate_idle_monitors();
|
||||
static int walk_monitor_list(ObjectMonitor** listheadp,
|
||||
ObjectMonitor** freeHeadp,
|
||||
ObjectMonitor** freeTailp);
|
||||
// For a given monitor list: global or per-thread, deflate idle monitors
|
||||
static int deflate_monitor_list(ObjectMonitor** listheadp,
|
||||
ObjectMonitor** freeHeadp,
|
||||
ObjectMonitor** freeTailp);
|
||||
static bool deflate_monitor(ObjectMonitor* mid, oop obj,
|
||||
ObjectMonitor** freeHeadp,
|
||||
ObjectMonitor** freeTailp);
|
||||
|
@ -135,16 +136,17 @@ class ObjectSynchronizer : AllStatic {
|
|||
|
||||
private:
|
||||
enum { _BLOCKSIZE = 128 };
|
||||
// global list of blocks of monitors
|
||||
// gBlockList is really PaddedEnd<ObjectMonitor> *, but we don't
|
||||
// want to expose the PaddedEnd template more than necessary.
|
||||
static ObjectMonitor* gBlockList;
|
||||
static ObjectMonitor * gBlockList;
|
||||
// global monitor free list
|
||||
static ObjectMonitor * volatile gFreeList;
|
||||
// global monitor in use list, for moribund threads,
|
||||
// global monitor in-use list, for moribund threads,
|
||||
// monitors they inflated need to be scanned for deflation
|
||||
static ObjectMonitor * volatile gOmInUseList;
|
||||
// count of entries in gOmInUseList
|
||||
static int gOmInUseCount;
|
||||
|
||||
};
|
||||
|
||||
// ObjectLocker enforced balanced locking and can never thrown an
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue