# HG changeset patch # User vlivanov # Date 1405333693 25200 # Node ID 945284eb609f7382e134f17ccb15047f9da11d9d # Parent bc4ce33c09856ad5990a941a6dbf8967880e9744 8049532: LogCompilation: C1: inlining tree is flat (no depth is stored) Reviewed-by: roland, iveresov diff -r bc4ce33c0985 -r 945284eb609f src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java --- a/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java Mon Jul 14 03:27:21 2014 -0700 +++ b/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java Mon Jul 14 03:28:13 2014 -0700 @@ -406,9 +406,17 @@ } else if (scopes.peek().getCalls().size() > 2 && m == scopes.peek().last(-2).getMethod()) { scopes.push(scopes.peek().last(-2)); } else { - System.out.println(site.getMethod()); - System.out.println(m); - throw new InternalError("call site and parse don't match"); + // C1 prints multiple method tags during inlining when it narrows method being inlinied. + // Example: + // ... + // + // + // + // + // + // ... + site.setMethod(m); + scopes.push(site); } } } else if (qname.equals("parse_done")) { diff -r bc4ce33c0985 -r 945284eb609f src/share/vm/c1/c1_GraphBuilder.cpp --- a/src/share/vm/c1/c1_GraphBuilder.cpp Mon Jul 14 03:27:21 2014 -0700 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Mon Jul 14 03:28:13 2014 -0700 @@ -3960,10 +3960,15 @@ // Clear out bytecode stream scope_data()->set_stream(NULL); + CompileLog* log = compilation()->log(); + if (log != NULL) log->head("parse method='%d'", log->identify(callee)); + // Ready to resume parsing in callee (either in the same block we // were in before or in the callee's start block) iterate_all_blocks(callee_start_block == NULL); + if (log != NULL) log->done("parse"); + // If we bailed out during parsing, return immediately (this is bad news) if (bailed_out()) return false;