stop dumping call graph in the MediaWiki test to speed things up; add a flag to Util to suppress call graph output in other cases

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4337 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2012-01-06 21:27:42 +00:00
parent 610c7e252e
commit 3057d11607
2 changed files with 6 additions and 1 deletions

View File

@ -32,7 +32,6 @@ public abstract class TestMediawikiCallGraphShape extends TestJSCallGraphShape {
URL url = new URL("http://en.wikipedia.org/wiki/2009_swine_flu_outbreak");
CallGraph CG = Util.makeHTMLCG(url);
verifyGraphAssertions(CG, assertionsForSwineFlu);
System.err.println(CG);
}
}

View File

@ -33,6 +33,11 @@ import com.ibm.wala.util.debug.Assertions;
public class Util {
/**
* flag to prevent dumping of verbose call graph / pointer analysis output
*/
private static final boolean AVOID_DUMP = false;
public static SourceFileModule makeSourceModule(URL script, String dir, String name) {
// DO NOT use File.separator here, since this name is matched against
// URLs. It seems that, in DOS, URL.getFile() does not return a
@ -72,6 +77,7 @@ public class Util {
}
public static void dumpCG(PointerAnalysis PA, CallGraph CG) {
if (AVOID_DUMP) return;
for (Iterator x = CG.iterator(); x.hasNext();) {
CGNode N = (CGNode) x.next();
System.err.println("\ncallees of node " + N.getMethod() + " " + N.getGraphNodeId());