8222893: markOopDesc::print_on() is a bit confused

Add print_on for ObjectMonitor and make markOop printing sensible and add test.

Reviewed-by: dcubed, pchilanomate
This commit is contained in:
Coleen Phillimore 2019-05-06 15:25:57 -04:00
parent 69647ce061
commit 26255c10cb
5 changed files with 168 additions and 21 deletions

View file

@ -733,8 +733,9 @@ void Klass::print_on(outputStream* st) const {
st->cr();
}
#define BULLET " - "
void Klass::oop_print_on(oop obj, outputStream* st) {
ResourceMark rm;
// print title
st->print_cr("%s ", internal_name());
obj->print_address_on(st);
@ -742,10 +743,13 @@ void Klass::oop_print_on(oop obj, outputStream* st) {
if (WizardMode) {
// print header
obj->mark()->print_on(st);
st->cr();
st->print(BULLET"prototype_header: " INTPTR_FORMAT, p2i(_prototype_header));
st->cr();
}
// print class
st->print(" - klass: ");
st->print(BULLET"klass: ");
obj->klass()->print_value_on(st);
st->cr();
}