Skip to content

Commit 7cbab1f

Browse files
enothumTobiHartmann
authored andcommitted
8312218: Print additional debug information when hitting assert(in_hash)
Reviewed-by: chagedorn, thartmann
1 parent 01e135c commit 7cbab1f

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
@@ -4889,7 +4889,16 @@ void Compile::remove_speculative_types(PhaseIterGVN &igvn) {
48894889
const Type* t_no_spec = t->remove_speculative();
48904890
if (t_no_spec != t) {
48914891
bool in_hash = igvn.hash_delete(n);
4892-
assert(in_hash, "node should be in igvn hash table");
4892+
#ifdef ASSERT
4893+
if (!in_hash) {
4894+
tty->print_cr("current graph:");
4895+
n->dump_bfs(MaxNodeLimit, nullptr, "S$");
4896+
tty->cr();
4897+
tty->print_cr("erroneous node:");
4898+
n->dump();
4899+
assert(false, "node should be in igvn hash table");
4900+
}
4901+
#endif
48934902
tn->set_type(t_no_spec);
48944903
igvn.hash_insert(n);
48954904
igvn._worklist.push(n); // give it a chance to go away

0 commit comments

Comments
 (0)