mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
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:
parent
69647ce061
commit
26255c10cb
5 changed files with 168 additions and 21 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue