summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-16 13:11:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-21 15:30:13 +0100
commitfece8f4737bb15db04b82b816822b1fe744d9be8 (patch)
tree6c9663b29fb5284d6c370363e1c95f598eeaf6d7 /bitbake
parent3afc48c38f3e5e0b6ff53dead13ee4bbcf4105bc (diff)
downloadpoky-fece8f4737bb15db04b82b816822b1fe744d9be8.tar.gz
bitbake: runqueue: Optimise holdoff task handling
We don't need to process the holdoff task list until we're executing tasks which saves some data manipulation, at the cost of some data structures not being correct at all times. This saves significant amounts of time in various profile charts of larger builds. (Bitbake rev: 270f076111b12eab358417b0c4cf9c70d7cc787a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 88212ca00c..0c17a23bdc 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1711,6 +1711,7 @@ class RunQueueExecute:
1711 self.stampcache = {} 1711 self.stampcache = {}
1712 1712
1713 self.holdoff_tasks = set() 1713 self.holdoff_tasks = set()
1714 self.holdoff_need_update = True
1714 self.sqdone = False 1715 self.sqdone = False
1715 1716
1716 self.stats = RunQueueStats(len(self.rqdata.runtaskentries)) 1717 self.stats = RunQueueStats(len(self.rqdata.runtaskentries))
@@ -2057,6 +2058,8 @@ class RunQueueExecute:
2057 self.rq.state = runQueueComplete 2058 self.rq.state = runQueueComplete
2058 return True 2059 return True
2059 2060
2061 self.update_holdofftasks()
2062
2060 if self.cooker.configuration.setsceneonly: 2063 if self.cooker.configuration.setsceneonly:
2061 task = None 2064 task = None
2062 else: 2065 else:
@@ -2194,6 +2197,9 @@ class RunQueueExecute:
2194 return taskdepdata 2197 return taskdepdata
2195 2198
2196 def update_holdofftasks(self): 2199 def update_holdofftasks(self):
2200
2201 if not self.holdoff_need_update:
2202 return
2197 self.holdoff_tasks = set() 2203 self.holdoff_tasks = set()
2198 2204
2199 for tid in self.rqdata.runq_setscene_tids: 2205 for tid in self.rqdata.runq_setscene_tids:
@@ -2205,6 +2211,8 @@ class RunQueueExecute:
2205 if dep not in self.runq_complete: 2211 if dep not in self.runq_complete:
2206 self.holdoff_tasks.add(dep) 2212 self.holdoff_tasks.add(dep)
2207 2213
2214 self.holdoff_need_update = False
2215
2208 def process_possible_migrations(self): 2216 def process_possible_migrations(self):
2209 2217
2210 changed = set() 2218 changed = set()
@@ -2324,7 +2332,7 @@ class RunQueueExecute:
2324 self.sqdone = False 2332 self.sqdone = False
2325 2333
2326 if changed: 2334 if changed:
2327 self.update_holdofftasks() 2335 self.holdoff_need_update = True
2328 2336
2329 def scenequeue_updatecounters(self, task, fail=False): 2337 def scenequeue_updatecounters(self, task, fail=False):
2330 2338
@@ -2373,7 +2381,7 @@ class RunQueueExecute:
2373 self.tasks_covered = covered 2381 self.tasks_covered = covered
2374 self.tasks_notcovered = notcovered 2382 self.tasks_notcovered = notcovered
2375 2383
2376 self.update_holdofftasks() 2384 self.holdoff_need_update = True
2377 2385
2378 def sq_task_completeoutright(self, task): 2386 def sq_task_completeoutright(self, task):
2379 """ 2387 """