Skip to content

Commit 7dc00d3

Browse files
committed
8345154: IGV: Show Parse and Assertion Predicate type as extra label
Reviewed-by: rcastanedalo
1 parent 1e086b1 commit 7dc00d3

File tree

2 files changed

+26
-2
lines changed
  • src

2 files changed

+26
-2
lines changed

src/hotspot/share/opto/ifnode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,10 +2213,10 @@ void ParsePredicateNode::dump_spec(outputStream* st) const {
22132213
st->print("Loop ");
22142214
break;
22152215
case Deoptimization::DeoptReason::Reason_profile_predicate:
2216-
st->print("Profiled_Loop ");
2216+
st->print("Profiled Loop ");
22172217
break;
22182218
case Deoptimization::DeoptReason::Reason_loop_limit_check:
2219-
st->print("Loop_Limit_Check ");
2219+
st->print("Loop Limit Check ");
22202220
break;
22212221
default:
22222222
fatal("unknown kind");

src/utils/IdealGraphVisualizer/ServerCompiler/src/main/resources/com/sun/hotspot/igv/servercompiler/filters/customNodeInfo.filter

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,27 @@ editProperty(matches("name", "CallLeafDirect|CallLeafDirectVector|CallLeafNoFPDi
3434
// Show pre/main/post at CountedLoopNodes.
3535
editProperty(hasProperty("loop_kind"), ["loop_kind"], "extra_label",
3636
function(loop_kind) { return loop_kind[0]; });
37+
38+
// Show Parse Predicate type.
39+
function parsePredicateInfo(dump_spec) {
40+
// It's easier to match with ".*" because type "Loop" can also be found in type "Loop Limit Check" and "Profiled Loop".
41+
// Matching with ".*" also requires us to exclude the optional "#useless" string at the end.
42+
var predicateMatch = /#(.*)(#useless)?/.exec(dump_spec);
43+
if (predicateMatch != null) {
44+
return predicateMatch[1].trim();
45+
}
46+
return null;
47+
}
48+
editProperty(matches("name", "ParsePredicate"), ["dump_spec"], "extra_label",
49+
function(dump_spec) { return parsePredicateInfo(dump_spec[0]);});
50+
51+
// Show Assertion Predicate type.
52+
function assertionPredicateInfo(dump_spec) {
53+
var predicateMatch = /#((Init|Last) Value Assertion Predicate)/.exec(dump_spec);
54+
if (predicateMatch != null) {
55+
return predicateMatch[1];
56+
}
57+
return null;
58+
}
59+
editProperty(matches("name", "If|RangeCheck"), ["dump_spec"], "extra_label",
60+
function(dump_spec) { return assertionPredicateInfo(dump_spec[0]);});

0 commit comments

Comments
 (0)