Accessible accessible;
+
+ // for debugging, which source file is this allocation in?
+ public static Hashtable<FlatNode, String> fn2filename;
+
// we construct an entry method of flat nodes complete
// with a new allocation site to model the command line
fc2enclosing = new Hashtable<FlatCall, Descriptor>();
+ fn2filename = new Hashtable<FlatNode, String>();
+
if( summarizePerClass ) {
mapTypeToAllocSite = new Hashtable<TypeDescriptor, AllocSite>();
typesToFlag = new HashSet<TypeDescriptor>();
" methods and "+totalNodeVisits+" nodes.";
}
if( state.DISJOINT_COUNT_GRAPH_ELEMENTS ) {
- treport += "\n"+getPartial( mdSourceEntry ).countGraphElements()+"\n";
- getPartial( mdSourceEntry ).writeGraph( "countElementsGraph",
- true,
- true,
- true,
- false,
- true,
- true,
- true );
- getPartial( mdSourceEntry ).writeNodes( "countElementsNodeListing.txt" );
+ GraphElementCount gec = new GraphElementCount();
+ for( Descriptor d : descriptorsToAnalyze ) {
+ getPartial( d ).countGraphElements( gec );
+ }
+ treport += "\n"+gec+"\n";
}
String justtime = String.format("%.2f", dt);
System.out.println(treport);
case FKind.FlatNew:
FlatNew fnn = (FlatNew) fn;
+
+ recordFilename( fn, fmContaining );
+
lhs = fnn.getDst();
if( shouldAnalysisTrack(lhs.getType() ) ) {
AllocSite as = getAllocSiteFromFlatNewPRIVATE(fnn);
return rgAtExit.canPointTo( x, arrayElementFieldName, x.getType().dereference() );
}
+
+
+ private void recordFilename( FlatNode fn, FlatMethod fmContaining ) {
+ ClassDescriptor cd = fmContaining.getMethod().getClassDesc();
+ String filename = "UNKNOWNFILE";
+ if( cd != null ) {
+ String s = cd.getSourceFileName();
+ if( s != null ) {
+ filename = s;
+ }
+ }
+ fn2filename.put( fn, filename );
+ }
+
+
// to evaluate convergence behavior
private static long totalMethodVisits = 0;