diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-15 15:58:41 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-17 19:07:19 +0000 |
commit | 834e452243ff2eea6e8e2e7f4935b5233ffb4b00 (patch) | |
tree | 1271593827ce851a1bf738238afb1a4e912eb39c | |
parent | 0b37fe89ba12549109905b6d0e6d07d342162436 (diff) | |
download | bitbake-contrib-834e452243ff2eea6e8e2e7f4935b5233ffb4b00.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/runqueue.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 864708ee4..24497c5c1 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -1390,12 +1390,12 @@ class RunQueue: continue worker.pipe.close() - def start_worker(self): + def start_worker(self, rqexec): if self.worker: self.teardown_workers() self.teardown = False for mc in self.rqdata.dataCaches: - self.worker[mc] = self._start_worker(mc) + self.worker[mc] = self._start_worker(mc, False, rqexec) def start_fakeworker(self, rqexec, mc): if not mc in self.fakeworker: @@ -1555,6 +1555,9 @@ class RunQueue: ('bb.event.HeartbeatEvent',), data=self.cfgData) self.dm_event_handler_registered = True + self.rqdata.init_progress_reporter.next_stage() + self.rqexe = RunQueueExecute(self) + dump = self.cooker.configuration.dump_signatures if dump: self.rqdata.init_progress_reporter.finish() @@ -1566,10 +1569,8 @@ class RunQueue: self.state = runQueueComplete if self.state is runQueueSceneInit: - self.rqdata.init_progress_reporter.next_stage() - self.start_worker() - self.rqdata.init_progress_reporter.next_stage() - self.rqexe = RunQueueExecute(self) + self.start_worker(self.rqexe) + self.rqdata.init_progress_reporter.finish() # If we don't have any setscene functions, skip execution if not self.rqdata.runq_setscene_tids: @@ -1823,11 +1824,6 @@ class RunQueueExecute: self.stats = RunQueueStats(len(self.rqdata.runtaskentries), len(self.rqdata.runq_setscene_tids)) - for mc in rq.worker: - rq.worker[mc].pipe.setrunqueueexec(self) - for mc in rq.fakeworker: - rq.fakeworker[mc].pipe.setrunqueueexec(self) - if self.number_tasks <= 0: bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks) @@ -2974,7 +2970,7 @@ def build_scenequeue_data(sqdata, rqdata, sqrq): if not sqdata.sq_revdeps[tid]: sqrq.sq_buildable.add(tid) - rqdata.init_progress_reporter.finish() + rqdata.init_progress_reporter.next_stage() sqdata.noexec = set() sqdata.stamppresent = set() @@ -3193,9 +3189,6 @@ class runQueuePipe(): self.rqexec = rqexec self.fakerootlogs = fakerootlogs - def setrunqueueexec(self, rqexec): - self.rqexec = rqexec - def read(self): for workers, name in [(self.rq.worker, "Worker"), (self.rq.fakeworker, "Fakeroot")]: for worker in workers.values(): |