null,
false);
// for controlling DOT file output
- private boolean writeFinalGraphs;
- private boolean writeAllUpdates;
+ private boolean writeDOTs;
+ private boolean writeAllDOTs;
TypeUtil tu,
CallGraph callGraph,
int allocationDepth,
- boolean writeFinalGraphs,
- boolean writeAllUpdates) throws java.io.IOException {
+ boolean writeDOTs,
+ boolean writeAllDOTs,
+ String aliasFile) throws java.io.IOException {
- this.state = state;
- this.typeUtil = tu;
- this.callGraph = callGraph;
- this.allocationDepth = allocationDepth;
- this.writeFinalGraphs = writeFinalGraphs;
- this.writeAllUpdates = writeAllUpdates;
+ this.state = state;
+ this.typeUtil = tu;
+ this.callGraph = callGraph;
+ this.allocationDepth = allocationDepth;
+ this.writeDOTs = writeDOTs;
+ this.writeAllDOTs = writeAllDOTs;
descriptorsToAnalyze = new HashSet<Descriptor>();
mapDescriptorToAllocationSiteSet =
new Hashtable<Descriptor, HashSet<AllocationSite> >();
- if( writeAllUpdates ) {
+ if( writeAllDOTs ) {
mapDescriptorToNumUpdates = new Hashtable<Descriptor, Integer>();
}
// a method if the methods that it calls are updated
analyzeMethods();
- writeAllAliases("identifiedAliases.txt");
+ System.out.println("");
+
+ if( aliasFile != null ) {
+ writeAllAliases(aliasFile);
+ }
}
// called from the constructor to help initialize the set
// boolean pruneGarbage,
// boolean writeReferencers
- if( writeFinalGraphs ) {
+ if( writeDOTs ) {
- if( !writeAllUpdates ) {
+ if( !writeAllDOTs ) {
og.writeGraph(d, true, true, true, false);
} else {
public boolean FLATIRGRAPHLIBMETHODS=false;
public boolean MULTICORE=false;
public boolean OWNERSHIP=false;
+ public int OWNERSHIPALLOCDEPTH=3;
+ public boolean OWNERSHIPWRITEDOTS=false;
+ public boolean OWNERSHIPWRITEALL=false;
+ public String OWNERSHIPALIASFILE=null;
public boolean OPTIONAL=false;
public boolean RAW=false;
public boolean SCHEDULING=false;
state.MULTICORE=true;
else if (option.equals("-ownership"))
state.OWNERSHIP=true;
+ else if (option.equals("-ownallocdepth")) {
+ state.OWNERSHIPALLOCDEPTH=Integer.parseInt(args[++i]);
+ } else if (option.equals("-ownwritedots")) {
+ state.OWNERSHIPWRITEDOTS=true;
+ if (args[++i].equals("all")) {
+ state.OWNERSHIPWRITEALL=true;
+ }
+ } else if (option.equals("-ownaliasfile"))
+ state.OWNERSHIPALIASFILE=args[++i];
else if (option.equals("-optional"))
state.OPTIONAL=true;
else if (option.equals("-raw"))
System.out.println("-flatirlibmethods -- create dot files for flat IR graphs of library class methods");
System.out.println(" note: -flatirusermethods or -flatirlibmethods currently generate all class method flat IR graphs");
System.out.println("-ownership -- do ownership analysis");
+ System.out.println("-ownallocdepth <d> -- set allocation depth for ownership analysis");
+ System.out.println("-ownwritedots <all/final> -- write ownership graphs; can be all results or just final results");
+ System.out.println("-ownaliasfile <filename> -- write a text file showing all detected aliases in program tasks");
System.out.println("-optional -- enable optional arguments");
System.out.println("-webinterface -- enable web interface");
System.out.println("-help -- print out help");
}
if (state.OWNERSHIP) {
- CallGraph callGraph = new CallGraph(state);
- int allocationDepth = 3;
- OwnershipAnalysis oa =
- new OwnershipAnalysis(state, tu, callGraph, allocationDepth, true, false);
- // oa.writeAllAliases( "identifiedAliases.txt" );
+ CallGraph callGraph = new CallGraph(state);
+ OwnershipAnalysis oa = new OwnershipAnalysis(state,
+ tu,
+ callGraph,
+ state.OWNERSHIPALLOCDEPTH,
+ state.OWNERSHIPWRITEDOTS,
+ state.OWNERSHIPWRITEALL,
+ state.OWNERSHIPALIASFILE);
}
System.exit(0);
}*/
/* Actually call task */
#ifdef PRECISE_GC
- ((int *)taskpointerarray)[0]=currtpd->numParameters;
+ ((int *)taskpointerarray)[0]=currtpd->numParameters;
taskpointerarray[1]=NULL;
#endif
execute:
}
/* Actually call task */
#ifdef PRECISE_GC
- ((int *)taskpointerarray)[0]=currtpd->numParameters;
+ ((int *)taskpointerarray)[0]=currtpd->numParameters;
taskpointerarray[1]=NULL;
#endif
#ifdef OPTIONAL