mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8003983: LogCompilation tool is broken since c1 support
Fixed emitting and parsing Reviewed-by: jrose, kvn
This commit is contained in:
parent
c5240e7c53
commit
42c0192ee6
3 changed files with 18 additions and 8 deletions
|
@ -37,7 +37,7 @@ import org.xml.sax.helpers.*;
|
|||
public class LogCompilation extends DefaultHandler implements ErrorHandler, Constants {
|
||||
|
||||
public static void usage(int exitcode) {
|
||||
System.out.println("Usage: LogCompilation [ -v ] [ -c ] [ -s ] [ -e | -N ] file1 ...");
|
||||
System.out.println("Usage: LogCompilation [ -v ] [ -c ] [ -s ] [ -e | -n ] file1 ...");
|
||||
System.out.println(" -c: clean up malformed 1.5 xml");
|
||||
System.out.println(" -i: print inlining decisions");
|
||||
System.out.println(" -S: print compilation statistics");
|
||||
|
|
|
@ -224,7 +224,6 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
|||
throw new InternalError("can't find " + name);
|
||||
}
|
||||
int indent = 0;
|
||||
String compile_id;
|
||||
|
||||
String type(String id) {
|
||||
String result = types.get(id);
|
||||
|
@ -268,7 +267,7 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
|||
if (qname.equals("phase")) {
|
||||
Phase p = new Phase(search(atts, "name"),
|
||||
Double.parseDouble(search(atts, "stamp")),
|
||||
Integer.parseInt(search(atts, "nodes")),
|
||||
Integer.parseInt(search(atts, "nodes", "0")),
|
||||
Integer.parseInt(search(atts, "live")));
|
||||
phaseStack.push(p);
|
||||
} else if (qname.equals("phase_done")) {
|
||||
|
@ -278,7 +277,7 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
|||
throw new InternalError("phase name mismatch");
|
||||
}
|
||||
p.setEnd(Double.parseDouble(search(atts, "stamp")));
|
||||
p.setEndNodes(Integer.parseInt(search(atts, "nodes")));
|
||||
p.setEndNodes(Integer.parseInt(search(atts, "nodes", "0")));
|
||||
p.setEndLiveNodes(Integer.parseInt(search(atts, "live")));
|
||||
compile.getPhases().add(p);
|
||||
} else if (qname.equals("task")) {
|
||||
|
@ -323,13 +322,16 @@ public class LogParser extends DefaultHandler implements ErrorHandler, Constants
|
|||
m.setName(search(atts, "name"));
|
||||
m.setReturnType(type(search(atts, "return")));
|
||||
m.setArguments(search(atts, "arguments", "void"));
|
||||
|
||||
if (search(atts, "unloaded", "0").equals("0")) {
|
||||
m.setBytes(search(atts, "bytes"));
|
||||
m.setIICount(search(atts, "iicount"));
|
||||
m.setFlags(search(atts, "flags"));
|
||||
}
|
||||
methods.put(id, m);
|
||||
} else if (qname.equals("call")) {
|
||||
site = new CallSite(bci, method(search(atts, "method")));
|
||||
site.setCount(Integer.parseInt(search(atts, "count")));
|
||||
site.setCount(Integer.parseInt(search(atts, "count", "0")));
|
||||
String receiver = atts.getValue("receiver");
|
||||
if (receiver != null) {
|
||||
site.setReceiver(type(receiver));
|
||||
|
|
|
@ -129,7 +129,15 @@ void Compilation::build_hir() {
|
|||
CHECK_BAILOUT();
|
||||
|
||||
// setup ir
|
||||
CompileLog* log = this->log();
|
||||
if (log != NULL) {
|
||||
log->begin_head("parse method='%d' ",
|
||||
log->identify(_method));
|
||||
log->stamp();
|
||||
log->end_head();
|
||||
}
|
||||
_hir = new IR(this, method(), osr_bci());
|
||||
if (log) log->done("parse");
|
||||
if (!_hir->is_valid()) {
|
||||
bailout("invalid parsing");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue