aboutsummaryrefslogtreecommitdiffstats
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
parentfece8f4737bb15db04b82b816822b1fe744d9be8 (diff)
downloadopenembedded-core-contrib-4cc3c0daed392c2938abda523ec34400f852e819.tar.gz
openembedded-core-contrib-4cc3c0daed392c2938abda523ec34400f852e819.tar.bz2
openembedded-core-contrib-4cc3c0daed392c2938abda523ec34400f852e819.zip
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>
-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 0c17a23bdc3..a98ccddd090 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2040,6 +2040,8 @@ class RunQueueExecute:
if self.can_start_task():
return True
+ self.update_holdofftasks()
+
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:
logger.info("Setscene tasks completed")
@@ -2058,8 +2060,6 @@ class RunQueueExecute:
self.rq.state = runQueueComplete
return True
- self.update_holdofftasks()
-
if self.cooker.configuration.setsceneonly:
task = None
else:
@@ -2200,6 +2200,29 @@ class RunQueueExecute:
if not self.holdoff_need_update:
return
+
+ notcovered = set(self.scenequeue_notcovered)
+ notcovered |= self.cantskip
+ for tid in self.scenequeue_notcovered:
+ notcovered |= self.sqdata.sq_covered_tasks[tid]
+ notcovered |= self.sqdata.unskippable.difference(self.rqdata.runq_setscene_tids)
+ notcovered.intersection_update(self.tasks_scenequeue_done)
+
+ covered = set(self.scenequeue_covered)
+ for tid in self.scenequeue_covered:
+ covered |= self.sqdata.sq_covered_tasks[tid]
+ covered.difference_update(notcovered)
+ covered.intersection_update(self.tasks_scenequeue_done)
+
+ for tid in notcovered | covered:
+ if len(self.rqdata.runtaskentries[tid].depends) == 0:
+ self.setbuildable(tid)
+ elif self.rqdata.runtaskentries[tid].depends.issubset(self.runq_complete):
+ self.setbuildable(tid)
+
+ self.tasks_covered = covered
+ self.tasks_notcovered = notcovered
+
self.holdoff_tasks = set()
for tid in self.rqdata.runq_setscene_tids:
@@ -2359,28 +2382,6 @@ class RunQueueExecute:
new.add(dep)
next = new
- notcovered = set(self.scenequeue_notcovered)
- notcovered |= self.cantskip
- for tid in self.scenequeue_notcovered:
- notcovered |= self.sqdata.sq_covered_tasks[tid]
- notcovered |= self.sqdata.unskippable.difference(self.rqdata.runq_setscene_tids)
- notcovered.intersection_update(self.tasks_scenequeue_done)
-
- covered = set(self.scenequeue_covered)
- for tid in self.scenequeue_covered:
- covered |= self.sqdata.sq_covered_tasks[tid]
- covered.difference_update(notcovered)
- covered.intersection_update(self.tasks_scenequeue_done)
-
- for tid in notcovered | covered:
- if len(self.rqdata.runtaskentries[tid].depends) == 0:
- self.setbuildable(tid)
- elif self.rqdata.runtaskentries[tid].depends.issubset(self.runq_complete):
- self.setbuildable(tid)
-
- self.tasks_covered = covered
- self.tasks_notcovered = notcovered
-
self.holdoff_need_update = True
def sq_task_completeoutright(self, task):