mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8037970: make PrintMethodData a diagnostic options
Make PrintMethodData a diagnostic options for performance investigation Reviewed-by: kvn, iveresov
This commit is contained in:
parent
fa3b0a8f47
commit
b21d142f01
10 changed files with 83 additions and 142 deletions
|
@ -115,7 +115,6 @@ void ProfileData::print_data_on(outputStream* st, const MethodData* md) const {
|
|||
print_data_on(st, print_data_on_helper(md));
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void ProfileData::print_shared(outputStream* st, const char* name, const char* extra) const {
|
||||
st->print("bci: %d", bci());
|
||||
st->fill_to(tab_width_one);
|
||||
|
@ -138,7 +137,6 @@ void ProfileData::print_shared(outputStream* st, const char* name, const char* e
|
|||
void ProfileData::tab(outputStream* st, bool first) const {
|
||||
st->fill_to(first ? tab_width_one : tab_width_two);
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
// ==================================================================
|
||||
// BitData
|
||||
|
@ -147,23 +145,19 @@ void ProfileData::tab(outputStream* st, bool first) const {
|
|||
// whether a checkcast bytecode has seen a null value.
|
||||
|
||||
|
||||
#ifndef PRODUCT
|
||||
void BitData::print_data_on(outputStream* st, const char* extra) const {
|
||||
print_shared(st, "BitData", extra);
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
// ==================================================================
|
||||
// CounterData
|
||||
//
|
||||
// A CounterData corresponds to a simple counter.
|
||||
|
||||
#ifndef PRODUCT
|
||||
void CounterData::print_data_on(outputStream* st, const char* extra) const {
|
||||
print_shared(st, "CounterData", extra);
|
||||
st->print_cr("count(%u)", count());
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
// ==================================================================
|
||||
// JumpData
|
||||
|
@ -188,12 +182,10 @@ void JumpData::post_initialize(BytecodeStream* stream, MethodData* mdo) {
|
|||
set_displacement(offset);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void JumpData::print_data_on(outputStream* st, const char* extra) const {
|
||||
print_shared(st, "JumpData", extra);
|
||||
st->print_cr("taken(%u) displacement(%d)", taken(), displacement());
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
int TypeStackSlotEntries::compute_cell_count(Symbol* signature, bool include_receiver, int max) {
|
||||
// Parameter profiling include the receiver
|
||||
|
@ -342,7 +334,6 @@ bool TypeEntriesAtCall::arguments_profiling_enabled() {
|
|||
return MethodData::profile_arguments();
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void TypeEntries::print_klass(outputStream* st, intptr_t k) {
|
||||
if (is_type_none(k)) {
|
||||
st->print("none");
|
||||
|
@ -398,7 +389,6 @@ void VirtualCallTypeData::print_data_on(outputStream* st, const char* extra) con
|
|||
_ret.print_data_on(st);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// ==================================================================
|
||||
// ReceiverTypeData
|
||||
|
@ -417,7 +407,6 @@ void ReceiverTypeData::clean_weak_klass_links(BoolObjectClosure* is_alive_cl) {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void ReceiverTypeData::print_receiver_data_on(outputStream* st) const {
|
||||
uint row;
|
||||
int entries = 0;
|
||||
|
@ -447,7 +436,6 @@ void VirtualCallData::print_data_on(outputStream* st, const char* extra) const {
|
|||
print_shared(st, "VirtualCallData", extra);
|
||||
print_receiver_data_on(st);
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
// ==================================================================
|
||||
// RetData
|
||||
|
@ -499,7 +487,6 @@ DataLayout* RetData::advance(MethodData *md, int bci) {
|
|||
}
|
||||
#endif // CC_INTERP
|
||||
|
||||
#ifndef PRODUCT
|
||||
void RetData::print_data_on(outputStream* st, const char* extra) const {
|
||||
print_shared(st, "RetData", extra);
|
||||
uint row;
|
||||
|
@ -516,7 +503,6 @@ void RetData::print_data_on(outputStream* st, const char* extra) const {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // !PRODUCT
|
||||
|
||||
// ==================================================================
|
||||
// BranchData
|
||||
|
@ -534,7 +520,6 @@ void BranchData::post_initialize(BytecodeStream* stream, MethodData* mdo) {
|
|||
set_displacement(offset);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void BranchData::print_data_on(outputStream* st, const char* extra) const {
|
||||
print_shared(st, "BranchData", extra);
|
||||
st->print_cr("taken(%u) displacement(%d)",
|
||||
|
@ -542,7 +527,6 @@ void BranchData::print_data_on(outputStream* st, const char* extra) const {
|
|||
tab(st);
|
||||
st->print_cr("not taken(%u)", not_taken());
|
||||
}
|
||||
#endif
|
||||
|
||||
// ==================================================================
|
||||
// MultiBranchData
|
||||
|
@ -608,7 +592,6 @@ void MultiBranchData::post_initialize(BytecodeStream* stream,
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void MultiBranchData::print_data_on(outputStream* st, const char* extra) const {
|
||||
print_shared(st, "MultiBranchData", extra);
|
||||
st->print_cr("default_count(%u) displacement(%d)",
|
||||
|
@ -620,9 +603,7 @@ void MultiBranchData::print_data_on(outputStream* st, const char* extra) const {
|
|||
count_at(i), displacement_at(i));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT
|
||||
void ArgInfoData::print_data_on(outputStream* st, const char* extra) const {
|
||||
print_shared(st, "ArgInfoData", extra);
|
||||
int nargs = number_of_args();
|
||||
|
@ -632,8 +613,6 @@ void ArgInfoData::print_data_on(outputStream* st, const char* extra) const {
|
|||
st->cr();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int ParametersTypeData::compute_cell_count(Method* m) {
|
||||
if (!MethodData::profile_parameters_for_method(m)) {
|
||||
return 0;
|
||||
|
@ -654,7 +633,6 @@ bool ParametersTypeData::profiling_enabled() {
|
|||
return MethodData::profile_parameters();
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void ParametersTypeData::print_data_on(outputStream* st, const char* extra) const {
|
||||
st->print("parameter types", extra);
|
||||
_parameters.print_data_on(st);
|
||||
|
@ -666,7 +644,6 @@ void SpeculativeTrapData::print_data_on(outputStream* st, const char* extra) con
|
|||
method()->print_short_name(st);
|
||||
st->cr();
|
||||
}
|
||||
#endif
|
||||
|
||||
// ==================================================================
|
||||
// MethodData*
|
||||
|
@ -1359,8 +1336,6 @@ ArgInfoData *MethodData::arg_info() {
|
|||
|
||||
// Printing
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
void MethodData::print_on(outputStream* st) const {
|
||||
assert(is_methodData(), "should be method data");
|
||||
st->print("method data for ");
|
||||
|
@ -1369,15 +1344,12 @@ void MethodData::print_on(outputStream* st) const {
|
|||
print_data_on(st);
|
||||
}
|
||||
|
||||
#endif //PRODUCT
|
||||
|
||||
void MethodData::print_value_on(outputStream* st) const {
|
||||
assert(is_methodData(), "should be method data");
|
||||
st->print("method data for ");
|
||||
method()->print_value_on(st);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void MethodData::print_data_on(outputStream* st) const {
|
||||
ResourceMark rm;
|
||||
ProfileData* data = first_data();
|
||||
|
@ -1418,7 +1390,6 @@ void MethodData::print_data_on(outputStream* st) const {
|
|||
if (dp >= end) return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
// Size Statistics
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue