summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-15 15:58:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-17 19:07:21 +0000
commit69a4180c88ddd231c99baf76d5b606e6fd2b4875 (patch)
tree3b084261cd63355c1451a4d71b3c528740947fb9 /bitbake/lib/bb
parente706249f7b68fdb57b8400d5d09ac4555a0868b5 (diff)
downloadpoky-69a4180c88ddd231c99baf76d5b606e6fd2b4875.tar.gz
bitbake: runqueue: Remove tie between rqexe and starts_worker
We've been moving to try and separate several pieces of runqueue. Allow start_worker to operate separately to rqexe since they don't need to be tied. This allows rqexe to be available to print_diff for future improvements. (Bitbake rev: 834e452243ff2eea6e8e2e7f4935b5233ffb4b00) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/runqueue.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 864708ee4a..24497c5c17 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1390,12 +1390,12 @@ class RunQueue:
1390 continue 1390 continue
1391 worker.pipe.close() 1391 worker.pipe.close()
1392 1392
1393 def start_worker(self): 1393 def start_worker(self, rqexec):
1394 if self.worker: 1394 if self.worker:
1395 self.teardown_workers() 1395 self.teardown_workers()
1396 self.teardown = False 1396 self.teardown = False
1397 for mc in self.rqdata.dataCaches: 1397 for mc in self.rqdata.dataCaches:
1398 self.worker[mc] = self._start_worker(mc) 1398 self.worker[mc] = self._start_worker(mc, False, rqexec)
1399 1399
1400 def start_fakeworker(self, rqexec, mc): 1400 def start_fakeworker(self, rqexec, mc):
1401 if not mc in self.fakeworker: 1401 if not mc in self.fakeworker:
@@ -1555,6 +1555,9 @@ class RunQueue:
1555 ('bb.event.HeartbeatEvent',), data=self.cfgData) 1555 ('bb.event.HeartbeatEvent',), data=self.cfgData)
1556 self.dm_event_handler_registered = True 1556 self.dm_event_handler_registered = True
1557 1557
1558 self.rqdata.init_progress_reporter.next_stage()
1559 self.rqexe = RunQueueExecute(self)
1560
1558 dump = self.cooker.configuration.dump_signatures 1561 dump = self.cooker.configuration.dump_signatures
1559 if dump: 1562 if dump:
1560 self.rqdata.init_progress_reporter.finish() 1563 self.rqdata.init_progress_reporter.finish()
@@ -1566,10 +1569,8 @@ class RunQueue:
1566 self.state = runQueueComplete 1569 self.state = runQueueComplete
1567 1570
1568 if self.state is runQueueSceneInit: 1571 if self.state is runQueueSceneInit:
1569 self.rqdata.init_progress_reporter.next_stage() 1572 self.start_worker(self.rqexe)
1570 self.start_worker() 1573 self.rqdata.init_progress_reporter.finish()
1571 self.rqdata.init_progress_reporter.next_stage()
1572 self.rqexe = RunQueueExecute(self)
1573 1574
1574 # If we don't have any setscene functions, skip execution 1575 # If we don't have any setscene functions, skip execution
1575 if not self.rqdata.runq_setscene_tids: 1576 if not self.rqdata.runq_setscene_tids:
@@ -1823,11 +1824,6 @@ class RunQueueExecute:
1823 1824
1824 self.stats = RunQueueStats(len(self.rqdata.runtaskentries), len(self.rqdata.runq_setscene_tids)) 1825 self.stats = RunQueueStats(len(self.rqdata.runtaskentries), len(self.rqdata.runq_setscene_tids))
1825 1826
1826 for mc in rq.worker:
1827 rq.worker[mc].pipe.setrunqueueexec(self)
1828 for mc in rq.fakeworker:
1829 rq.fakeworker[mc].pipe.setrunqueueexec(self)
1830
1831 if self.number_tasks <= 0: 1827 if self.number_tasks <= 0:
1832 bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks) 1828 bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks)
1833 1829
@@ -2974,7 +2970,7 @@ def build_scenequeue_data(sqdata, rqdata, sqrq):
2974 if not sqdata.sq_revdeps[tid]: 2970 if not sqdata.sq_revdeps[tid]:
2975 sqrq.sq_buildable.add(tid) 2971 sqrq.sq_buildable.add(tid)
2976 2972
2977 rqdata.init_progress_reporter.finish() 2973 rqdata.init_progress_reporter.next_stage()
2978 2974
2979 sqdata.noexec = set() 2975 sqdata.noexec = set()
2980 sqdata.stamppresent = set() 2976 sqdata.stamppresent = set()
@@ -3193,9 +3189,6 @@ class runQueuePipe():
3193 self.rqexec = rqexec 3189 self.rqexec = rqexec
3194 self.fakerootlogs = fakerootlogs 3190 self.fakerootlogs = fakerootlogs
3195 3191
3196 def setrunqueueexec(self, rqexec):
3197 self.rqexec = rqexec
3198
3199 def read(self): 3192 def read(self):
3200 for workers, name in [(self.rq.worker, "Worker"), (self.rq.fakeworker, "Fakeroot")]: 3193 for workers, name in [(self.rq.worker, "Worker"), (self.rq.fakeworker, "Fakeroot")]:
3201 for worker in workers.values(): 3194 for worker in workers.values():