From c7d55913d9b1867cf6fb4442c4bb7ededfc983b0 Mon Sep 17 00:00:00 2001 From: jjenista Date: Wed, 17 Mar 2010 21:31:29 +0000 Subject: [PATCH] fixed issues with dot graph writing that make our debugging lives harder --- .../Analysis/Disjoint/DisjointAnalysis.java | 7 +-- Robust/src/Analysis/Disjoint/ReachGraph.java | 45 ++++++++----------- 2 files changed, 20 insertions(+), 32 deletions(-) diff --git a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java index 688d342a..93104670 100644 --- a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java +++ b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java @@ -717,8 +717,7 @@ public class DisjointAnalysis { true, // write labels (variables) true, // selectively hide intermediate temp vars true, // prune unreachable heap regions - false, // show back edges to confirm graph validity - true, // hide subset reachability states + false, // hide subset reachability states true ); // hide edge taints } catch( IOException e ) {} } @@ -742,8 +741,7 @@ public class DisjointAnalysis { true, // write labels (variables) false, // selectively hide intermediate temp vars false, // prune unreachable heap regions - false, // show back edges to confirm graph validity - true, // hide subset reachability states + false, // hide subset reachability states true ); // hide edge taints } catch( IOException e ) {} } @@ -1421,7 +1419,6 @@ private ReachGraph createInitialTaskReachGraph(FlatMethod fm) { true, // write labels (variables) true, // selectively hide intermediate temp vars true, // prune unreachable heap regions - false, // show back edges to confirm graph validity true, // hide subset reachability states true );// hide edge taints } catch( Exception e ) { diff --git a/Robust/src/Analysis/Disjoint/ReachGraph.java b/Robust/src/Analysis/Disjoint/ReachGraph.java index edab79cb..cce95f49 100644 --- a/Robust/src/Analysis/Disjoint/ReachGraph.java +++ b/Robust/src/Analysis/Disjoint/ReachGraph.java @@ -1900,7 +1900,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { - rg.writeGraph( "calleeview", true, false, false, false, true, true ); + rg.writeGraph( "calleeview", true, false, false, true, true ); } catch( IOException e ) {} } @@ -1924,9 +1924,9 @@ public class ReachGraph { if( writeDebugDOTs ) { try { rgCallee.writeGraph( "callee", - true, false, false, false, true, true ); + true, false, false, true, true ); writeGraph( "caller00In", - true, false, false, false, true, true, + true, false, false, true, true, callerNodeIDsCopiedToCallee ); } catch( IOException e ) {} } @@ -2148,7 +2148,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller20BeforeWipe", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2170,7 +2170,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller30BeforeAddingNodes", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2235,7 +2235,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller31BeforeAddingEdges", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2431,7 +2431,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller35BeforeAssignReturnValue", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2513,7 +2513,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller38propagateReach", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2539,7 +2539,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller40BeforeShadowMerge", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2636,7 +2636,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller45BeforeUnshadow", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2660,7 +2660,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller50BeforeGlobalSweep", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } @@ -2675,7 +2675,7 @@ public class ReachGraph { if( writeDebugDOTs ) { try { writeGraph( "caller90AfterTransfer", - true, false, false, false, true, true ); + true, false, false, true, true ); } catch( IOException e ) {} } } @@ -3752,7 +3752,6 @@ public class ReachGraph { boolean writeLabels, boolean labelSelect, boolean pruneGarbage, - boolean writeReferencers, boolean hideSubsetReachability, boolean hideEdgeTaints ) throws java.io.IOException { @@ -3760,7 +3759,6 @@ public class ReachGraph { writeLabels, labelSelect, pruneGarbage, - writeReferencers, hideSubsetReachability, hideEdgeTaints, null ); @@ -3770,7 +3768,6 @@ public class ReachGraph { boolean writeLabels, boolean labelSelect, boolean pruneGarbage, - boolean writeReferencers, boolean hideSubsetReachability, boolean hideEdgeTaints, Set callerNodeIDsCopiedToCallee @@ -3821,9 +3818,7 @@ public class ReachGraph { // only visit nodes worth writing out--for instance // not every node at an allocation is referenced // (think of it as garbage-collected), etc. - if( !pruneGarbage || - (hrn.isFlagged() && hrn.getID() > 0) || - hrn.getDescription().startsWith( "param" ) || + if( !pruneGarbage || hrn.isOutOfContext() ) { @@ -3832,7 +3827,6 @@ public class ReachGraph { bw, null, visited, - writeReferencers, hideSubsetReachability, hideEdgeTaints, callerNodeIDsCopiedToCallee ); @@ -3852,10 +3846,10 @@ public class ReachGraph { if( labelSelect ) { String labelStr = vn.getTempDescriptorString(); - if( labelStr.startsWith("___temp") || - labelStr.startsWith("___dst") || - labelStr.startsWith("___srctmp") || - labelStr.startsWith("___neverused") + if( labelStr.startsWith( "___temp" ) || + labelStr.startsWith( "___dst" ) || + labelStr.startsWith( "___srctmp" ) || + labelStr.startsWith( "___neverused" ) ) { continue; } @@ -3866,12 +3860,11 @@ public class ReachGraph { RefEdge edge = heapRegionsItr.next(); HeapRegionNode hrn = edge.getDst(); - if( pruneGarbage && !visited.contains( hrn ) ) { + if( !visited.contains( hrn ) ) { traverseHeapRegionNodes( hrn, bw, null, visited, - writeReferencers, hideSubsetReachability, hideEdgeTaints, callerNodeIDsCopiedToCallee ); @@ -3893,7 +3886,6 @@ public class ReachGraph { BufferedWriter bw, TempDescriptor td, Set visited, - boolean writeReferencers, boolean hideSubsetReachability, boolean hideEdgeTaints, Set callerNodeIDsCopiedToCallee @@ -3954,7 +3946,6 @@ public class ReachGraph { bw, td, visited, - writeReferencers, hideSubsetReachability, hideEdgeTaints, callerNodeIDsCopiedToCallee ); -- 2.34.1