summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
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:26:15 +0000
commitf86baae14dc9205474dbd1ef50b81bae18818970 (patch)
treed2cca03661de655cbbc8f97a45607c002c3f9358 /bitbake/lib/bb
parent456f5e0d2325c24bcd51fc8d8fffb415d7cbc3a8 (diff)
downloadpoky-f86baae14dc9205474dbd1ef50b81bae18818970.tar.gz
bitbake: 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. (Bitbake rev: c5c5d786ca968d0e48002fe8acbcc8a63a954b67) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/runqueue.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 02a9b912fa..26492e7087 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1397,7 +1397,7 @@ class RunQueue:
1397 cache[tid] = iscurrent 1397 cache[tid] = iscurrent
1398 return iscurrent 1398 return iscurrent
1399 1399
1400 def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False): 1400 def validate_hashes(self, tocheck, data, currentcount=0, siginfo=False, summary=True):
1401 valid = set() 1401 valid = set()
1402 if self.hashvalidate: 1402 if self.hashvalidate:
1403 sq_data = {} 1403 sq_data = {}
@@ -1410,15 +1410,15 @@ class RunQueue:
1410 sq_data['hashfn'][tid] = self.rqdata.dataCaches[mc].hashfn[taskfn] 1410 sq_data['hashfn'][tid] = self.rqdata.dataCaches[mc].hashfn[taskfn]
1411 sq_data['unihash'][tid] = self.rqdata.runtaskentries[tid].unihash 1411 sq_data['unihash'][tid] = self.rqdata.runtaskentries[tid].unihash
1412 1412
1413 valid = self.validate_hash(sq_data, data, siginfo, currentcount) 1413 valid = self.validate_hash(sq_data, data, siginfo, currentcount, summary)
1414 1414
1415 return valid 1415 return valid
1416 1416
1417 def validate_hash(self, sq_data, d, siginfo, currentcount): 1417 def validate_hash(self, sq_data, d, siginfo, currentcount, summary):
1418 locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount} 1418 locs = {"sq_data" : sq_data, "d" : d, "siginfo" : siginfo, "currentcount" : currentcount, "summary" : summary}
1419 1419
1420 # Metadata has **kwargs so args can be added, sq_data can also gain new fields 1420 # Metadata has **kwargs so args can be added, sq_data can also gain new fields
1421 call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount)" 1421 call = self.hashvalidate + "(sq_data, d, siginfo=siginfo, currentcount=currentcount, summary=summary)"
1422 1422
1423 return bb.utils.better_eval(call, locs) 1423 return bb.utils.better_eval(call, locs)
1424 1424
@@ -1605,7 +1605,7 @@ class RunQueue:
1605 1605
1606 tocheck.add(tid) 1606 tocheck.add(tid)
1607 1607
1608 valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True) 1608 valid_new = self.validate_hashes(tocheck, self.cooker.data, 0, True, summary=False)
1609 1609
1610 # Tasks which are both setscene and noexec never care about dependencies 1610 # Tasks which are both setscene and noexec never care about dependencies
1611 # We therefore find tasks which are setscene and noexec and mark their 1611 # We therefore find tasks which are setscene and noexec and mark their
@@ -1986,7 +1986,7 @@ class RunQueueExecute:
1986 continue 1986 continue
1987 logger.debug(1, "Task %s no longer deferred" % nexttask) 1987 logger.debug(1, "Task %s no longer deferred" % nexttask)
1988 del self.sq_deferred[nexttask] 1988 del self.sq_deferred[nexttask]
1989 valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False) 1989 valid = self.rq.validate_hashes(set([nexttask]), self.cooker.data, 0, False, summary=False)
1990 if not valid: 1990 if not valid:
1991 logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask) 1991 logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask)
1992 self.sq_task_failoutright(nexttask) 1992 self.sq_task_failoutright(nexttask)
@@ -2367,9 +2367,13 @@ class RunQueueExecute:
2367 if tid in self.build_stamps: 2367 if tid in self.build_stamps:
2368 del self.build_stamps[tid] 2368 del self.build_stamps[tid]
2369 2369
2370 logger.info("Setscene task %s now valid and being rerun" % tid) 2370 origvalid = False
2371 if tid in self.sqdata.valid:
2372 origvalid = True
2371 self.sqdone = False 2373 self.sqdone = False
2372 update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self) 2374 update_scenequeue_data([tid], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
2375 if tid in self.sqdata.valid and not origvalid:
2376 logger.info("Setscene task %s became valid" % tid)
2373 2377
2374 if changed: 2378 if changed:
2375 self.holdoff_need_update = True 2379 self.holdoff_need_update = True
@@ -2698,9 +2702,9 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
2698 sqdata.stamppresent = set() 2702 sqdata.stamppresent = set()
2699 sqdata.valid = set() 2703 sqdata.valid = set()
2700 2704
2701 update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq) 2705 update_scenequeue_data(sqdata.sq_revdeps, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True)
2702 2706
2703def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq): 2707def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, summary=True):
2704 2708
2705 tocheck = set() 2709 tocheck = set()
2706 2710
@@ -2734,7 +2738,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq):
2734 2738
2735 tocheck.add(tid) 2739 tocheck.add(tid)
2736 2740
2737 sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False) 2741 sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary)
2738 2742
2739 sqdata.hashes = {} 2743 sqdata.hashes = {}
2740 for mc in sorted(sqdata.multiconfigs): 2744 for mc in sorted(sqdata.multiconfigs):