Skip to content

Commit f953b8a

Browse files
committed
8312218: Print additional debug information when hitting assert(in_hash)
Backport-of: 7cbab1f39636f3cf32f1276bc46feaa8107a14e6
1 parent 0a2e2e7 commit f953b8a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/hotspot/share/opto/compile.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4907,7 +4907,16 @@ void Compile::remove_speculative_types(PhaseIterGVN &igvn) {
49074907
const Type* t_no_spec = t->remove_speculative();
49084908
if (t_no_spec != t) {
49094909
bool in_hash = igvn.hash_delete(n);
4910-
assert(in_hash, "node should be in igvn hash table");
4910+
#ifdef ASSERT
4911+
if (!in_hash) {
4912+
tty->print_cr("current graph:");
4913+
n->dump_bfs(MaxNodeLimit, nullptr, "S$");
4914+
tty->cr();
4915+
tty->print_cr("erroneous node:");
4916+
n->dump();
4917+
assert(false, "node should be in igvn hash table");
4918+
}
4919+
#endif
49114920
tn->set_type(t_no_spec);
49124921
igvn.hash_insert(n);
49134922
igvn._worklist.push(n); // give it a chance to go away

0 commit comments

Comments
 (0)