static protected Hashtable<FlatNode, ReachGraph> fn2rg =
new Hashtable<FlatNode, ReachGraph>();
+ private Hashtable<FlatCall, Descriptor> fc2enclosing;
+
+
// allocate various structures that are not local
// to a single class method--should be done once
new Hashtable<Descriptor, ReachGraph>();
pm = new PointerMethod();
+
+ if( state.DISJOINTDEBUGSCHEDULING ) {
+ fc2enclosing = new Hashtable<FlatCall, Descriptor>();
+ }
+
}
System.out.println( " "+dNext );
}
}
+ }
- if( state.DISJOINTDVISITSTACKEESONTOP ) {
-
- depsItr = calleesToEnqueue.iterator();
- while( depsItr.hasNext() ) {
- Descriptor dNext = depsItr.next();
- enqueue( dNext );
- }
- calleesToEnqueue.clear();
+ // whether or not the method under analysis changed,
+ // we may have some callees that are scheduled for
+ // more analysis, and they should go on the top of
+ // the stack now (in other method-visiting modes they
+ // are already enqueued at this point
+ if( state.DISJOINTDVISITSTACKEESONTOP ) {
+ Iterator<Descriptor> depsItr = calleesToEnqueue.iterator();
+ while( depsItr.hasNext() ) {
+ Descriptor dNext = depsItr.next();
+ enqueue( dNext );
}
+ calleesToEnqueue.clear();
+ }
- } else {
- // we got the result result as the last visit
- // to this method, but we might need to clean
- // something up
- if( state.DISJOINTDVISITSTACKEESONTOP ) {
- calleesToEnqueue.clear();
- }
- }
-
- }
+ }
}
protected ReachGraph analyzeMethod( Descriptor d )
rg.merge( rgContrib );
}
-
// additionally, we are enforcing STRICT MONOTONICITY for the
// method's initial context, so grow the context by whatever
// the previously computed context was, and put the most
if( state.DISJOINTDEBUGSCHEDULING ) {
System.out.println( " context changed, scheduling callee: "+mdCallee );
+
+ // if we're debugging the scheduling system, map a FlatCall
+ // to its enclosing method/task descriptor so we can write
+ // that info out later
+ fc2enclosing.put( fc, mdCaller );
}
if( state.DISJOINTDVISITSTACKEESONTOP ) {
return heapsFromCallers.get( fc );
}
+
public void addIHMcontribution( Descriptor d,
FlatCall fc,
ReachGraph rg
heapsFromCallers.put( fc, rg );
}
+
private AllocSite createParameterAllocSite( ReachGraph rg,
TempDescriptor tempDesc,
boolean flagRegions
#DEBUGFLAGS= -disjoint-debug-callsite addElement addInterOutput 30 100 false
#DEBUGFLAGS= -disjoint-debug-callsite setPartial reduceOutput 1 20 false
-
#DEBUGFLAGS= -disjoint-debug-callsite close Transaction 1 20 false
#VISITMODE= -disjoint-dvisit-pqueue
VISITMODE= -disjoint-dvisit-stack-callees-on-top
-DEBUGMODE= -enable-assertions -disjoint-write-dots final -disjoint-write-ihms -disjoint-write-initial-contexts -disjoint-alias-file aliases.txt normal -disjoint-desire-determinism #-disjoint-debug-scheduling
+DEBUGMODE= -enable-assertions -disjoint-write-dots final -disjoint-alias-file aliases.txt normal -disjoint-desire-determinism #-disjoint-write-ihms -disjoint-debug-scheduling -disjoint-write-initial-contexts
RELEASEMODE= -disjoint-release-mode -disjoint-alias-file aliases.txt tabbed
BSFLAGS= -justanalyze -disjoint -disjoint-k 1 #-flatirusermethods -flatirtasks