# HG changeset patch # User Tom Rodriguez # Date 1445620188 25200 # Node ID 76e1d16c28cc9cdb3374d33f32a88a35a1f542c1 # Parent ce4bec6db0b26435b45ff1e625e10b740f5aecb4 Make sure that at least a dummy Method is filled in during LogCompilation parsing diff -r ce4bec6db0b2 -r 76e1d16c28cc 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 Fri Oct 23 13:24:08 2015 +0200 +++ b/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java Fri Oct 23 10:09:48 2015 -0700 @@ -199,9 +199,11 @@ if (ble instanceof NMethod) { NMethod nm = (NMethod) ble; // Native wrappers for methods don't have a compilation and Graal methods don't either. - if (c != null) { - c.setNMethod(nm); + if (c == null) { + c = new Compilation(Integer.parseInt(nm.getId())); + log.compiles.put(ble.getId(), c); } + c.setNMethod(nm); } else { if (c == null) { // throw new InternalError("can't find compilation " + ble.getId() + " for " + ble); @@ -306,9 +308,14 @@ compile.setBCount(search(atts, "backedge_count", "0")); String method = atts.getValue("method"); + Method m = new Method(); int space = method.indexOf(' '); - method = method.substring(0, space) + "::" + - method.substring(space + 1, method.indexOf(' ', space + 1) + 1); + m.setHolder(method.substring(0, space)); + m.setName(method.substring(space + 1, method.indexOf(' ', space + 1) + 1)); + m.setReturnType(method.substring(method.lastIndexOf(')') + 1)); + m.setArguments(method.substring(method.indexOf('(') + 1, method.lastIndexOf(')'))); + m.setFlags("0"); + compile.setMethod(m); String compiler = atts.getValue("compiler"); if (compiler == null) { compiler = ""; @@ -320,10 +327,11 @@ if (kind.equals("osr")) { compile.setOsr(true); compile.setOsr_bci(Integer.parseInt(search(atts, "osr_bci"))); + compile.setMethod(m); } else if (kind.equals("c2i")) { compile.setSpecial("--- adapter " + method); } else { - compile.setSpecial(compile.getId() + " " + method + " (0 bytes)"); + compile.setMethod(m); } events.add(compile); compiles.put(makeId(atts), compile);