summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-16 13:32:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-21 15:30:13 +0100
commit4cc3c0daed392c2938abda523ec34400f852e819 (patch)
treea65a530458b9397e1bc5bc21d622126fbc7d6959 /bitbake
parentfece8f4737bb15db04b82b816822b1fe744d9be8 (diff)
downloadpoky-4cc3c0daed392c2938abda523ec34400f852e819.tar.gz
bitbake: runqueue: Further optimise holdoff tasks
There are other data structures which can be reprocessed at the same time as holdoff_tasks, further improving build efficiency in various places. (Bitbake rev: 02090b3456b7a2de12e72dfeaabfd3b631609924) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py49
1 files changed, 25 insertions, 24 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 0c17a23bdc..a98ccddd09 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2040,6 +2040,8 @@ class RunQueueExecute:
2040 if self.can_start_task(): 2040 if self.can_start_task():
2041 return True 2041 return True
2042 2042
2043 self.update_holdofftasks()
2044
2043 if not self.sq_live and not self.sqdone and not self.sq_deferred and not self.updated_taskhash_queue and not self.holdoff_tasks: 2045 if not self.sq_live and not self.sqdone and not self.sq_deferred and not self.updated_taskhash_queue and not self.holdoff_tasks:
2044 logger.info("Setscene tasks completed") 2046 logger.info("Setscene tasks completed")
2045 2047
@@ -2058,8 +2060,6 @@ class RunQueueExecute:
2058 self.rq.state = runQueueComplete 2060 self.rq.state = runQueueComplete
2059 return True 2061 return True
2060 2062
2061 self.update_holdofftasks()
2062
2063 if self.cooker.configuration.setsceneonly: 2063 if self.cooker.configuration.setsceneonly:
2064 task = None 2064 task = None
2065 else: 2065 else:
@@ -2200,6 +2200,29 @@ class RunQueueExecute:
2200 2200
2201 if not self.holdoff_need_update: 2201 if not self.holdoff_need_update:
2202 return 2202 return
2203
2204 notcovered = set(self.scenequeue_notcovered)
2205 notcovered |= self.cantskip
2206 for tid in self.scenequeue_notcovered:
2207 notcovered |= self.sqdata.sq_covered_tasks[tid]
2208 notcovered |= self.sqdata.unskippable.difference(self.rqdata.runq_setscene_tids)
2209 notcovered.intersection_update(self.tasks_scenequeue_done)
2210
2211 covered = set(self.scenequeue_covered)
2212 for tid in self.scenequeue_covered:
2213 covered |= self.sqdata.sq_covered_tasks[tid]
2214 covered.difference_update(notcovered)
2215 covered.intersection_update(self.tasks_scenequeue_done)
2216
2217 for tid in notcovered | covered:
2218 if len(self.rqdata.runtaskentries[tid].depends) == 0:
2219 self.setbuildable(tid)
2220 elif self.rqdata.runtaskentries[tid].depends.issubset(self.runq_complete):
2221 self.setbuildable(tid)
2222
2223 self.tasks_covered = covered
2224 self.tasks_notcovered = notcovered
2225
2203 self.holdoff_tasks = set() 2226 self.holdoff_tasks = set()
2204 2227
2205 for tid in self.rqdata.runq_setscene_tids: 2228 for tid in self.rqdata.runq_setscene_tids:
@@ -2359,28 +2382,6 @@ class RunQueueExecute:
2359 new.add(dep) 2382 new.add(dep)
2360 next = new 2383 next = new
2361 2384
2362 notcovered = set(self.scenequeue_notcovered)
2363 notcovered |= self.cantskip
2364 for tid in self.scenequeue_notcovered:
2365 notcovered |= self.sqdata.sq_covered_tasks[tid]
2366 notcovered |= self.sqdata.unskippable.difference(self.rqdata.runq_setscene_tids)
2367 notcovered.intersection_update(self.tasks_scenequeue_done)
2368
2369 covered = set(self.scenequeue_covered)
2370 for tid in self.scenequeue_covered:
2371 covered |= self.sqdata.sq_covered_tasks[tid]
2372 covered.difference_update(notcovered)
2373 covered.intersection_update(self.tasks_scenequeue_done)
2374
2375 for tid in notcovered | covered:
2376 if len(self.rqdata.runtaskentries[tid].depends) == 0:
2377 self.setbuildable(tid)
2378 elif self.rqdata.runtaskentries[tid].depends.issubset(self.runq_complete):
2379 self.setbuildable(tid)
2380
2381 self.tasks_covered = covered
2382 self.tasks_notcovered = notcovered
2383
2384 self.holdoff_need_update = True 2385 self.holdoff_need_update = True
2385 2386
2386 def sq_task_completeoutright(self, task): 2387 def sq_task_completeoutright(self, task):