-
- /*
- protected void mergeHeapRoots( OwnershipGraph og ) {
- Set sA = og.heapRoots.entrySet();
- Iterator iA = sA.iterator();
- while( iA.hasNext() ) {
- Map.Entry meA = (Map.Entry) iA.next();
- Integer idA = (Integer) meA.getKey();
- HeapRegionNode hrnA = (HeapRegionNode) meA.getValue();
-
- if( !heapRoots.containsKey( idA ) ) {
- assert id2hrn.containsKey( idA );
- HeapRegionNode hrnB = id2hrn.get( idA );
- heapRoots.put( idA, hrnB );
- }
- }
- }
- */
-
- /*
- protected void mergeAnalysisRegions( OwnershipGraph og ) {
- Iterator iA = og.analysisRegionLabels.iterator();
- while( iA.hasNext() ) {
- TempDescriptor tdA = (TempDescriptor) iA.next();
- if( !analysisRegionLabels.contains( tdA ) ) {
- analysisRegionLabels.add( tdA );
- }
- }
- }
-
- protected void mergeNewClusters( OwnershipGraph og ) {
- Set sA = og.fn2nc.entrySet();
- Iterator iA = sA.iterator();
- while( iA.hasNext() ) {
- Map.Entry meA = (Map.Entry) iA.next();
- FlatNew fnA = (FlatNew) meA.getKey();
- NewCluster ncA = (NewCluster) meA.getValue();
-
- // if the A cluster doesn't exist in B we have to construct
- // it carefully because the nodes and their edges have already
- // been merged above. Just find the equivalent heap regions
- // in the B graph by matching IDs
-
- // if the cluster already exists the edges of its elements
- // should already have been merged by the above code that
- // does not care whether the regions are part of clusters
- NewCluster ncB = null;
- if( !fn2nc.containsKey( fnA ) ) {
- ncB = new NewCluster( allocationDepth );
-
- for( int i = 0; i < allocationDepth; ++i ) {
- HeapRegionNode hrnA = ncA.getIthOldest( i );
-
- // this node shouldn't exist in graph B if the
- // corresponding new cluster didn't exist in B
- //assert !id2hrn.containsKey( hrnA.getID() );
-
- HeapRegionNode hrnB = createNewHeapRegionNode( hrnA.getID(),
- hrnA.isSingleObject(),
- hrnA.isFlagged(),
- hrnA.isNewSummary() );
- ncB.setIthOldest( i, hrnB );
- }
-
- fn2nc.put( fnA, ncB );
- }
- }
- }
- */