RFR(S/M): 8217659 monitor_logging updates from Async Monitor Deflation project
Daniel D. Daugherty
daniel.daugherty at oracle.com
Sat Jan 26 01:47:27 UTC 2019
On 1/24/19 9:27 AM, Daniel D. Daugherty wrote:
> On 1/24/19 2:41 AM, David Holmes wrote:
>
>> + // I'm not sure why the baseline monitorinflation logic only
>> + // issues logging mesgs for instance objects.
>> + // if (obj->is_instance()) {
>>
>> This needs to be resolved.
>
> Yes, that would be why I left that comment in for the review. :-)
> I'll check the code history for the original monitor deflation
> logging code and see if I can discern a reason.
So I tracked back that check to:
$ sgv -r1.65 src/share/vm/runtime/synchronizer.cpp | grep 'if
(object->is_instance())'
1.65
1.65 if (object->is_instance()) {
$ sp -r1.65 synchronizer.cpp
SCCS/s.synchronizer.cpp:
D 1.65 05/06/17 17:01:01 kbr 127 125 00085/00002/00728
MRs:
COMMENTS:
6264252 Improve uncontended synchronization performance
That bug ID (6264252) might sound familiar... It's the
integration of Biased Locking into the system. I'm
guessing that Ken needed this block for debugging:
> if (TraceMonitorInflation) {
> if (object->is_instance()) {
> ResourceMark rm;
> tty->print_cr("Inflating object " INTPTR_FORMAT " , mark "
INTPTR_FORMAT " , type %s",
> (intptr_t) object, (intptr_t) object->mark(),
Klass::cast(object->klass())->external_name());
> }
> }
and that the is_instance() check was a way of reducing
the debug output.
>
>> If the alternative to being an instance is being an array, then I
>> think we should be logging for those too (that might actually catch
>> use of the class initialization monitors).
>
> In my debugging of a recent test failure, I saw logging output
> for and inflated "[I" at the end of the VM's life (IIRC)...
I'm planning to drop the 'if (obj->is_instance())' checks and
I'll verify what happens with the Trace logging.
Dan
More information about the hotspot-runtime-dev
mailing list