# HG changeset patch # User Peter Hofer # Date 1320251251 -3600 # Node ID ed3ac862d22d1967f8147a1a08ecfdea84b3cac0 # Parent abb55d24ba56dffb5752d38ada4b60b281dd3381 IdealGraphVisualizer: make Graal graph-to-text converter work again after last commit by copying properties that have the same value in the two input graphs groups to the newly created diff group's properties. diff -r abb55d24ba56 -r ed3ac862d22d src/share/tools/IdealGraphVisualizer/Difference/src/com/sun/hotspot/igv/difference/Difference.java --- a/src/share/tools/IdealGraphVisualizer/Difference/src/com/sun/hotspot/igv/difference/Difference.java Wed Nov 02 17:05:21 2011 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Difference/src/com/sun/hotspot/igv/difference/Difference.java Wed Nov 02 17:27:31 2011 +0100 @@ -31,6 +31,7 @@ import com.sun.hotspot.igv.data.InputGraph; import com.sun.hotspot.igv.data.InputNode; import com.sun.hotspot.igv.data.Pair; +import com.sun.hotspot.igv.data.Properties; import com.sun.hotspot.igv.data.Property; import com.sun.hotspot.igv.data.services.Scheduler; import java.util.Collection; @@ -103,6 +104,18 @@ Group g = new Group(); g.setMethod(a.getGroup().getMethod()); g.setAssembly(a.getGroup().getAssembly()); + if (a.getGroup() == b.getGroup()) { + g.getProperties().add(a.getGroup().getProperties()); + } else { + // copy properties that have the same value in both groups + Properties bps = b.getGroup().getProperties(); + for (Property p : a.getGroup().getProperties()) { + String value = p.getValue(); + if (value != null && value.equals(bps.get(p.getName()))) { + g.getProperties().setProperty(p.getName(), value); + } + } + } g.getProperties().setProperty("name", "Difference"); InputGraph graph = g.addGraph(a.getName() + ", " + b.getName(), new Pair(a, b));