aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-15 17:46:01 +0000
committerArmin Kuster <akuster808@gmail.com>2019-12-17 22:14:47 -0800
commit14babbf0a32637db640e0494b0331397dcb0f715 (patch)
tree5b913c5b9292c39b6d190d7193103878242b81d1
parent57df7f191755dd887827d51b125d246c1af3e1b6 (diff)
downloadbitbake-14babbf0a32637db640e0494b0331397dcb0f715.tar.gz
runqueue: Optimise out pointless loop iteration
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 105d1f0748edde7753a4063e6fdc758ffc8a8a9e)
-rw-r--r--lib/bb/runqueue.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 6da612b71..73775d976 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1182,11 +1182,8 @@ class RunQueueData:
return len(self.runtaskentries)
def prepare_task_hash(self, tid):
- procdep = []
- for dep in self.runtaskentries[tid].depends:
- procdep.append(dep)
- bb.parse.siggen.prep_taskhash(tid, procdep, self.dataCaches[mc_from_tid(tid)])
- self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, procdep, self.dataCaches[mc_from_tid(tid)])
+ bb.parse.siggen.prep_taskhash(tid, self.runtaskentries[tid].depends, self.dataCaches[mc_from_tid(tid)])
+ self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(tid, self.runtaskentries[tid].depends, self.dataCaches[mc_from_tid(tid)])
self.runtaskentries[tid].unihash = bb.parse.siggen.get_unihash(tid)
def dump_data(self):
@@ -2294,11 +2291,8 @@ class RunQueueExecute:
for tid in current:
if len(self.rqdata.runtaskentries[p].depends) and not self.rqdata.runtaskentries[tid].depends.isdisjoint(total):
continue
- procdep = []
- for dep in self.rqdata.runtaskentries[tid].depends:
- procdep.append(dep)
orighash = self.rqdata.runtaskentries[tid].hash
- newhash = bb.parse.siggen.get_taskhash(tid, procdep, self.rqdata.dataCaches[mc_from_tid(tid)])
+ newhash = bb.parse.siggen.get_taskhash(tid, self.rqdata.runtaskentries[tid].depends, self.rqdata.dataCaches[mc_from_tid(tid)])
origuni = self.rqdata.runtaskentries[tid].unihash
newuni = bb.parse.siggen.get_unihash(tid)
# FIXME, need to check it can come from sstate at all for determinism?