< prev index next >
src/hotspot/share/code/pcDesc.cpp
Print this page
rev 54883 : 8213084: Rework and enhance Print[Opto]Assembly output
Reviewed-by:
*** 1,7 ****
/*
! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 38,60 ****
address PcDesc::real_pc(const CompiledMethod* code) const {
return code->code_begin() + pc_offset();
}
! void PcDesc::print(CompiledMethod* code) {
#ifndef PRODUCT
ResourceMark rm;
! tty->print_cr("PcDesc(pc=" PTR_FORMAT " offset=%x bits=%x):", p2i(real_pc(code)), pc_offset(), _flags);
if (scope_decode_offset() == DebugInformationRecorder::serialized_null) {
return;
}
for (ScopeDesc* sd = code->scope_desc_at(real_pc(code));
sd != NULL;
sd = sd->sender()) {
! sd->print_on(tty);
}
#endif
}
bool PcDesc::verify(CompiledMethod* code) {
--- 38,65 ----
address PcDesc::real_pc(const CompiledMethod* code) const {
return code->code_begin() + pc_offset();
}
! void PcDesc::print_on(outputStream* st, CompiledMethod* code) {
#ifndef PRODUCT
ResourceMark rm;
! st->print("PcDesc(pc=" PTR_FORMAT " offset=%x bits=%x):", p2i(real_pc(code)), pc_offset(), _flags);
if (scope_decode_offset() == DebugInformationRecorder::serialized_null) {
+ st->cr();
return;
}
+ int tab = 8;
+ int pos = st->position() + 2; // current column plus two spaces
+ pos = ((pos+tab-1)/tab)*tab;
+
for (ScopeDesc* sd = code->scope_desc_at(real_pc(code));
sd != NULL;
sd = sd->sender()) {
! sd->print_on(st);
}
#endif
}
bool PcDesc::verify(CompiledMethod* code) {
< prev index next >