summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-10 15:07:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-16 23:02:45 +0100
commitf025010ee02130bd7f6bd6073a9a0b111aaa9936 (patch)
tree1e7922c7f0bfb2f57e81f97050f08d07f606fda2 /bitbake/lib
parent85f8e4c04a6e665bcf2ee5565fca45b6814fd65c (diff)
downloadpoky-f025010ee02130bd7f6bd6073a9a0b111aaa9936.tar.gz
bitbake: runqueue/siggen: Optimise hash equiv queries
We only have hash equivalence for setscene tasks so only query the server for those, reducing the number of connections needed. (Bitbake rev: 22082c7b3ca0cffcedb7d1d8c6681d35286376db) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/runqueue.py1
-rw-r--r--bitbake/lib/bb/siggen.py10
2 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index addb2bb82f..45bfec8c37 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1173,6 +1173,7 @@ class RunQueueData:
1173 self.prepare_task_hash(tid) 1173 self.prepare_task_hash(tid)
1174 1174
1175 bb.parse.siggen.writeout_file_checksum_cache() 1175 bb.parse.siggen.writeout_file_checksum_cache()
1176 bb.parse.siggen.set_setscene_tasks(self.runq_setscene_tids)
1176 1177
1177 #self.dump_data() 1178 #self.dump_data()
1178 return len(self.runtaskentries) 1179 return len(self.runtaskentries)
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index b503559305..8b593a348b 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -91,6 +91,8 @@ class SignatureGenerator(object):
91 def save_unitaskhashes(self): 91 def save_unitaskhashes(self):
92 return 92 return
93 93
94 def set_setscene_tasks(self, setscene_tasks):
95 return
94 96
95class SignatureGeneratorBasic(SignatureGenerator): 97class SignatureGeneratorBasic(SignatureGenerator):
96 """ 98 """
@@ -106,6 +108,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
106 self.taints = {} 108 self.taints = {}
107 self.gendeps = {} 109 self.gendeps = {}
108 self.lookupcache = {} 110 self.lookupcache = {}
111 self.setscenetasks = {}
109 self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST") or "").split()) 112 self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST") or "").split())
110 self.taskwhitelist = None 113 self.taskwhitelist = None
111 self.init_rundepcheck(data) 114 self.init_rundepcheck(data)
@@ -151,6 +154,9 @@ class SignatureGeneratorBasic(SignatureGenerator):
151 154
152 return taskdeps 155 return taskdeps
153 156
157 def set_setscene_tasks(self, setscene_tasks):
158 self.setscenetasks = setscene_tasks
159
154 def finalise(self, fn, d, variant): 160 def finalise(self, fn, d, variant):
155 161
156 mc = d.getVar("__BBMULTICONFIG", False) or "" 162 mc = d.getVar("__BBMULTICONFIG", False) or ""
@@ -394,6 +400,10 @@ class SignatureGeneratorUniHashMixIn(object):
394 400
395 taskhash = self.taskhash[tid] 401 taskhash = self.taskhash[tid]
396 402
403 # If its not a setscene task we can return
404 if self.setscenetasks and tid not in self.setscenetasks:
405 return taskhash
406
397 key = self.__get_task_unihash_key(tid) 407 key = self.__get_task_unihash_key(tid)
398 408
399 # TODO: This cache can grow unbounded. It probably only needs to keep 409 # TODO: This cache can grow unbounded. It probably only needs to keep