aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-04 17:29:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-25 21:25:35 +0000
commitc5c5d786ca968d0e48002fe8acbcc8a63a954b67 (patch)
tree13b8175ed3cccad1470ba1807da148e36ebffd12
parent4299afdd290f9d1c5616598f5fe83c195a64b63c (diff)
downloadbitbake-contrib-c5c5d786ca968d0e48002fe8acbcc8a63a954b67.tar.gz
runqueue: Improve sstate rehashing output
Bibake is currently too 'chatty' when hash equivalence is enabled. Fix this by only printing the log output if a rehash happens and it matches an sstate object. Also, pass a summary option to the hash checking function. This was already changed to a mechanism which allows addition of new parameters so this should be backwards and forwards compatible. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/runqueue.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 02a9b912f..26492e708 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1397,7 +1397,7 @@ class RunQueue:
cache[tid] = iscurrent
return iscurrent
- def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False):
+ def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False, summary=True):
valid = set()
if self.hashvalidate:
sq_data = {}
@@ -1410,15 +1410,15 @@ class RunQueue:
sq_data['hashfn'][tid] = self.rqdata.dataCaches[mc].hashfn[taskfn]
sq_data['unihash'][tid] = self.rqdata.runtaskentries[tid].unihash
- valid = self.validate_hash(sq_data, data, siginfo, currentcount)
+ valid = self.validate_hash(sq_data, data, siginfo, currentcount, summary)
return valid
- def validate_hash(self, sq_data, d, siginfo, currentcount):
- locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount}
+ def validate_hash(self, sq_data, d, siginfo, currentcount, summary):
+ locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount, "summary" : summary}
# Metadata has **kwargs so args can be added, sq_data can also gain new fields
- call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount)"
+ call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount, summary=summary)"
return bb.utils.better_eval(call, locs)
@@ -1605,7 +1605,7 @@ class RunQueue:
tocheck.add(tid)
- valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True)
+ valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True, summary=False)
# Tasks which are both setscene and noexec never care about dependencies
# We therefore find tasks which are setscene and noexec and mark their
@@ -1986,7 +1986,7 @@ class RunQueueExecute:
continue
logger.debug(1, "Task %s no longer deferred" % nexttask)
del self.sq_deferred[nexttask]
- valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False)
+ valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False, summary=False)
if not valid:
logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask)
self.sq_task_failoutright(nexttask)
@@ -2367,9 +2367,13 @@ class RunQueueExecute:
if tid in self.build_stamps:
del self.build_stamps[tid]
- logger.info("Setscene task %s now valid and being rerun" % tid)
+ origvalid = False
+ if tid in self.sqdata.valid:
+ origvalid = True
self.sqdone = False
- update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self)
+ update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
+ if tid in self.sqdata.valid and not origvalid:
+ logger.info("Setscene task %s became valid" % tid)
if changed:
self.holdoff_need_update = True
@@ -2698,9 +2702,9 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
sqdata.stamppresent = set()
sqdata.valid = set()
- update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq)
+ update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
-def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq):
+def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True):
tocheck = set()
@@ -2734,7 +2738,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq):
tocheck.add(tid)
- sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False)
+ sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary)
sqdata.hashes = {}
for mc in sorted(sqdata.multiconfigs):