RFR: 8253064: monitor list simplifications and getting rid of TSM
Daniel D.Daugherty
dcubed at openjdk.java.net
Sat Nov 7 18:01:57 UTC 2020
On Fri, 6 Nov 2020 02:33:37 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Changes from @fisk and @dcubed-ojdk to:
>>
>> - simplify ObjectMonitor list management
>> - get rid of Type-Stable Memory (TSM)
>>
>> This change has been tested with Mach5 Tier[1-3],4,5,6,7,8; no new regressions.
>> Aurora Perf runs have also been done (DaCapo-h2, Quick Startup/Footprint,
>> SPECjbb2015-Tuned-G1, SPECjbb2015-Tuned-ParGC, Volano)
>> - a few minor regressions (<= -0.24%)
>> - Volano is 6.8% better
>>
>> Eric C. has also done promotion perf runs on these bits and says "the results look fine".
>
> src/hotspot/share/runtime/synchronizer.hpp line 173:
>
>> 171:
>> 172: static MonitorList _in_use_list;
>> 173: static jint _in_use_list_ceiling;
>
> Can you add some commentary on what this ceiling is as I could not understand its role just by looking at the code. Thanks.
How about this:
static MonitorList _in_use_list;
// The ratio of the current _in_use_list count to the ceiling is used
// to determine if we are above MonitorUsedDeflationThreshold and need
// to do an async monitor deflation cycle. The ceiling is increased by
// AvgMonitorsPerThreadEstimate when a thread is added to the system
// and is decreased by AvgMonitorsPerThreadEstimate when a thread is
// removed from the system.
// Note: If the _in_use_list max exceeds the ceiling, then
// monitors_used_above_threshold() will use the in_use_list max instead
// of the thread count derived ceiling because we have used more
// ObjectMonitors than the estimated average.
static jint _in_use_list_ceiling;
> src/hotspot/share/runtime/synchronizer.cpp line 221:
>
>> 219:
>> 220: MonitorList ObjectSynchronizer::_in_use_list;
>> 221: // Start the ceiling with one thread:
>
> This relates to me not understanding what this ceiling is (as commented elsewhere) but why does this say "start with one thread" when the value of AvgMonitorsPerThreadEstimate defaults to 1024 ??
The estimate is that a single thread will generate at most 1024 inflated
ObjectMonitors on average.
I changed the comment like this:
// Start the ceiling with the estimate for one thread:
jint ObjectSynchronizer::_in_use_list_ceiling = AvgMonitorsPerThreadEstimate;
Does that help?
-------------
PR: https://git.openjdk.java.net/jdk/pull/642
More information about the serviceability-dev
mailing list