Subversion Repositories DevTools

Rev

Rev 7141 | Rev 7147 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7141 Rev 7145
Line 216... Line 216...
216
     */
216
     */
217
    public void planRelease(final boolean lastBuildActive) throws SQLException, Exception
217
    public void planRelease(final boolean lastBuildActive) throws SQLException, Exception
218
    {
218
    {
219
        mLogger.warn("planRelease mDaemon {}", mDaemon);
219
        mLogger.warn("planRelease mDaemon {}", mDaemon);
220
 
220
 
-
 
221
        //
-
 
222
        //  Diagnostic output
-
 
223
        //  Having issues with memory usage
-
 
224
        //
-
 
225
        long totalMem = Runtime.getRuntime().totalMemory();
-
 
226
        long freeMem = Runtime.getRuntime().freeMemory();
-
 
227
        mLogger.error("Memory Usage: Total: {}, Free: {}, Used: {}", totalMem, freeMem, totalMem - freeMem);
-
 
228
        
221
        mBuildCollection.clear();
229
        mBuildCollection.clear();
222
        mPackageCollection.clear();
230
        mPackageCollection.clear();
223
        mPackageCollectionRipple.clear();
231
        mPackageCollectionRipple.clear();
224
        mPackageCollectionTest.clear();
232
        mPackageCollectionTest.clear();
225
        mPackageCollectionWip.clear();
233
        mPackageCollectionWip.clear();
Line 365... Line 373...
365
                phase.setPhase("disconnectForPlanning");
373
                phase.setPhase("disconnectForPlanning");
366
                mReleaseManager.disconnectForPlanning(lastBuildActive);
374
                mReleaseManager.disconnectForPlanning(lastBuildActive);
367
            }
375
            }
368
        }
376
        }
369
 
377
 
-
 
378
        //
-
 
379
        //  Attempt to release objects that have been created during the planning phase
-
 
380
        //
-
 
381
        mBuildCollection.clear();
-
 
382
        mPackageCollection.clear();
-
 
383
        mPackageCollectionRipple.clear();
-
 
384
        mPackageCollectionTest.clear();
-
 
385
        mPackageCollectionWip.clear();
-
 
386
        mBuildOrder.clear();
-
 
387
        mEscrowRawData = "";
-
 
388
        mEscrowSetup = "";
-
 
389
        
-
 
390
        
-
 
391
        
370
        mLogger.warn("planRelease mDaemon {} returned", mDaemon);
392
        mLogger.warn("planRelease mDaemon {} returned", mDaemon);
371
        phase.setPhase("EndPlan");
393
        phase.setPhase("EndPlan");
372
    }
394
    }
373
    
395
    
374
    /** Process packages that have been collected as a part of the plan
396
    /** Process packages that have been collected as a part of the plan
Line 1111... Line 1133...
1111
                    }
1133
                    }
1112
                }
1134
                }
1113
 
1135
 
1114
                //
1136
                //
1115
                //  Report packages that are indirectly excluded
1137
                //  Report packages that are indirectly excluded
1116
                //  ie: They will not be built because one, or more, of there dependents is not buildable
1138
                //  ie: They will not be built because one, or more, of their dependents is not buildable
1117
                //
1139
                //
1118
                mLogger.debug("planBuildOrder process packages which are not ripple buildable");
1140
                mLogger.debug("planBuildOrder process packages which are not ripple buildable");
1119
 
1141
 
1120
                Package.resetCircularDependency (mPackageCollection);
1142
                Package.resetCircularDependency (mPackageCollection);
1121
                 for (ListIterator<BuildExclusion> it = mBuildExclusionCollection.listIterator(); it.hasNext(); )
1143
                 for (ListIterator<BuildExclusion> it = mBuildExclusionCollection.listIterator(); it.hasNext(); )
1122
                 {
1144
                 {
1123
                     BuildExclusion be = it.next();
1145
                     BuildExclusion be = it.next();
1124
 
1146
 
1125
                     for (Iterator<Package> it1 = mPackageCollection.iterator(); it1.hasNext(); )
1147
                     for (Iterator<Package> it1 = mPackageCollectionAll.iterator(); it1.hasNext(); )
1126
                     {
1148
                     {
1127
                         Package p = it1.next();
1149
                         Package p = it1.next();
1128
 
1150
 
1129
                         // ensure only root cause, non test build, build exclusions are excluded
1151
                         // ensure only root cause, non test build, build exclusions are excluded
1130
                         // mBuildExclusionCollection is at this point based on
1152
                         // mBuildExclusionCollection is at this point based on
Line 1135... Line 1157...
1135
                             // package is not reproducible, discard it and its consumers
1157
                             // package is not reproducible, discard it and its consumers
1136
                             //
1158
                             //
1137
                             mLogger.info("Excluded Package {}, {}", p.mAlias, be );                                     
1159
                             mLogger.info("Excluded Package {}, {}", p.mAlias, be );                                     
1138
                             
1160
                             
1139
                             ArrayList<Package> toExclude = new ArrayList<Package>();
1161
                             ArrayList<Package> toExclude = new ArrayList<Package>();
1140
                             toExclude.addAll(usedByAnyPackages(p, mPackageCollection ));
1162
                             toExclude.addAll(usedByAnyPackages(p, mPackageCollectionAll ));
1141
                             
1163
                             
1142
                             //  Process packages that we need to exclude indirectly
1164
                             //  Process packages that we need to exclude indirectly
1143
                             //
1165
                             //
1144
                             while ( ! toExclude.isEmpty())
1166
                             while ( ! toExclude.isEmpty())
1145
                             {
1167
                             {
Line 1204... Line 1226...
1204
                     {
1226
                     {
1205
                         it.remove();
1227
                         it.remove();
1206
                         mLogger.error("Purge mBuildOrder {}", pkg.mPkg);
1228
                         mLogger.error("Purge mBuildOrder {}", pkg.mPkg);
1207
                     }
1229
                     }
1208
                 }
1230
                 }
1209
                 
-
 
1210
 
-
 
1211
                
1231
                
1212
                //
1232
                //
1213
                //  To fit in with the old algorithm ( ie: could be improved )
1233
                //  To fit in with the old algorithm ( ie: could be improved )
1214
                //  Insert marks into all packages
1234
                //  Insert marks into all packages
1215
                //  Not sure exactly why - Its used in the generation of the ant build file
1235
                //  Not sure exactly why - Its used in the generation of the ant build file