src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java Fri Aug 16 01:22:31 2013
--- new/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java Fri Aug 16 01:22:30 2013
*** 205,230 ****
--- 205,229 ----
return log.events;
}
String search(Attributes attr, String name) {
! return search(attr, name, null);
! String result = attr.getValue(name);
+ if (result != null) {
+ return result;
+ } else {
+ throw new InternalError("can't find " + name);
+ }
}
String search(Attributes attr, String name, String defaultValue) {
String result = attr.getValue(name);
if (result != null) {
return result;
}
if (defaultValue != null) {
return defaultValue;
}
for (int i = 0; i < attr.getLength(); i++) {
System.out.println(attr.getQName(i) + " " + attr.getValue(attr.getQName(i)));
}
throw new InternalError("can't find " + name);
}
int indent = 0;
String type(String id) {
String result = types.get(id);
if (result == null) {
*** 266,286 ****
--- 265,286 ----
Attributes atts) {
if (qname.equals("phase")) {
Phase p = new Phase(search(atts, "name"),
Double.parseDouble(search(atts, "stamp")),
Integer.parseInt(search(atts, "nodes", "0")),
! Integer.parseInt(search(atts, "live", "0")));
phaseStack.push(p);
} else if (qname.equals("phase_done")) {
Phase p = phaseStack.pop();
if (! p.getId().equals(search(atts, "name"))) {
+ String phaseName = search(atts, "name", null);
+ if (phaseName != null && !p.getId().equals(phaseName)) {
System.out.println("phase: " + p.getId());
throw new InternalError("phase name mismatch");
}
p.setEnd(Double.parseDouble(search(atts, "stamp")));
p.setEndNodes(Integer.parseInt(search(atts, "nodes", "0")));
! p.setEndLiveNodes(Integer.parseInt(search(atts, "live", "0")));
compile.getPhases().add(p);
} else if (qname.equals("task")) {
compile = new Compilation(Integer.parseInt(search(atts, "compile_id", "-1")));
compile.setStart(Double.parseDouble(search(atts, "stamp")));
compile.setICount(search(atts, "count", "0"));
*** 411,422 ****
--- 411,422 ----
throw new InternalError("call site and parse don't match");
}
}
} else if (qname.equals("parse_done")) {
CallSite call = scopes.pop();
! call.setEndNodes(Integer.parseInt(search(atts, "nodes", "1")));
! call.setEndLiveNodes(Integer.parseInt(search(atts, "live", "1")));
! call.setEndNodes(Integer.parseInt(search(atts, "nodes", "0")));
! call.setEndLiveNodes(Integer.parseInt(search(atts, "live", "0")));
call.setTimeStamp(Double.parseDouble(search(atts, "stamp")));
scopes.push(call);
}
}
src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File