RFR(S): 8003983 Fix of broken logcompilation tool

Nils Eliasson nils.eliasson at oracle.com
Wed Dec 5 04:13:07 PST 2012


Yes, putting the defaults in the LogParser makes a lot of sense.

Updated webrev:

http://cr.openjdk.java.net/~neliasso/8003983/webrev.02/

//Nils

John Rose skrev 2012-12-04 21:37:
>
> Generally speaking, if an attribute in the LogCompilation XML has a 
> default value, it can be omitted from the log file.  At least, that's 
> how I think about the XML schema (or lack thereof).
>
> Therefore, I think the XML reader needs to be robust if attributes are 
> missing.
>
> You are adding these explicit attributes to some parts of the XML output:
>   phase ... nodes='0'
>   parse_done ... nodes='0'
>   call ... count='0'
>
> This is OK, but would it be possible to default them in the reader 
> instead?  That way of doing things may lead to a more robust system. 
>  Something like this:
>  -  site.setCount(Integer.parseInt(search(atts, "count")));
>  +  site.setCount(Integer.parseInt(search(atts, "count", "0")));
> (etc.)
>
> In the present case, either way is fine with me.  You can cite me as a 
> reviewer.
>
> — John



More information about the hotspot-compiler-dev mailing list