RFR (S) 8222893: markOopDesc::print_on() is a bit confused
Daniel D. Daugherty
daniel.daugherty at oracle.com
Fri May 3 16:08:12 UTC 2019
Thanks for taking care of this bug.
On 5/3/19 11:31 AM, coleen.phillimore at oracle.com wrote:
> Summary: Add print_on for ObjectMonitor and make markOop printing
> sensible and add test.
>
> Testing with mach5 ongoing, but tested locally.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/2019/8222893.01/webrev
src/hotspot/share/oops/klass.cpp
old L737: ResourceMark rm;
Why delete the ResourceMark?
L744: st->cr();
As long as there are no tests that depend on this 'WizardMode'
output style, this should be okay. (Please search the tests
for use of WizardMode'.
src/hotspot/share/oops/markOop.cpp
L47: if (is_neutral()) { // 001 biased bit in 3rd right bit
Previously your comment was '// last bits = ???'
I think that was a better style.
L54: } else if (has_bias_pattern()) { // 101
Previously your comment was '// last bits = ???'
I think that was a better style.
src/hotspot/share/runtime/objectMonitor.cpp
No comments.
src/hotspot/share/runtime/objectMonitor.hpp
No comments.
test/hotspot/gtest/oops/test_markOop.cpp
L67: // Notify gets the lock inflated
Actually it is wait() that gets the lock inflated.
L88: assert_test_pattern(h_obj, "is_biased");
A comment about why a newly created object would be biased
would help here. Something like:
// Biased locking is enabled for java.lang.Object:
There are some gtest pieces here that I'm not familiar with,
but the test looks good to me. Obviously someone with more
gtest experience should also review.
Thumbs up.
Dan
> bug link https://bugs.openjdk.java.net/browse/JDK-8222893
>
> Thanks,
> Coleen
More information about the hotspot-runtime-dev
mailing list