# HG changeset patch # User Gilles Duboscq # Date 1362387587 -3600 # Node ID 1a83cef20ee5fe84b0fd3e782d06ec8df2696383 # Parent 3b5578749256331874acfe1f5951f9ce49c72eec Fix for the Graal CFG filter, be a bit more robust and accept graphs comming from the binary deserializer. Fixes GRAAL-127 Similarb change in the Graal edge color filter. Make it more robust. diff -r 3b5578749256 -r 1a83cef20ee5 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Sun Mar 03 10:56:18 2013 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Mon Mar 04 09:59:47 2013 +0100 @@ -45,7 +45,6 @@ Set connectionsToRemove = new HashSet<>(); for (Figure f : d.getFigures()) { final String prop = f.getProperties().get("probability"); - if (prop == null) { figuresToRemove.add(f); } @@ -54,7 +53,15 @@ for (Figure f : d.getFigures()) { Properties p = f.getProperties(); - int predCount = Integer.parseInt(p.get("predecessorCount")); + int predCount; + String predCountString = p.get("predecessorCount"); + if (predCountString != null) { + predCount = Integer.parseInt(predCountString); + } else if (Boolean.parseBoolean(p.get("hasPredecessor"))) { + predCount = 1; + } else { + predCount = 0; + } for (InputSlot is : f.getInputSlots()) { if (is.getPosition() >= predCount && !"EndNode".equals(is.getProperties().get("class"))) { for (Connection c : is.getConnections()) { diff -r 3b5578749256 -r 1a83cef20ee5 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java Sun Mar 03 10:56:18 2013 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalEdgeColorFilter.java Mon Mar 04 09:59:47 2013 +0100 @@ -58,7 +58,10 @@ for (Figure f : figures) { Properties p = f.getProperties(); int predCount; - if (Boolean.parseBoolean(p.get("hasPredecessor"))) { + String predCountString = p.get("predecessorCount"); + if (predCountString != null) { + predCount = Integer.parseInt(predCountString); + } else if (Boolean.parseBoolean(p.get("hasPredecessor"))) { predCount = 1; } else { predCount = 0;