summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cache.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-01 22:19:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-08 10:49:53 +0000
commit8fe5f307e2921e3ecf46e2b45f89fd1982680315 (patch)
treef2447d528e4058fa71c4fe2fe18c6f8d8a243735 /bitbake/lib/bb/cache.py
parentc14d8b9b6bd3a6fa4bae93c65425aaa936336546 (diff)
downloadpoky-8fe5f307e2921e3ecf46e2b45f89fd1982680315.tar.gz
bitbake: siggen/cache: Optionally allow adding siggen hash data to the bitbake cache
Being able to track siggen hash construction data can be useful for cache debugging. For now, add an extra cache class which contains this information. It can be enabled in the same way as the hob data cache through a feature flag to cooker. This allows us to experiment with the data without carrying larger patches around and ultimately may allow use to have a hash mismatch debugging mode that is more easily enabled. (Bitbake rev: 0736a8a03da8b774fafbd28f746bef4705378049) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r--bitbake/lib/bb/cache.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index e117fe56cb..96ab069180 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -238,6 +238,31 @@ class CoreRecipeInfo(RecipeInfoCommon):
238 cachedata.fakerootlogs[fn] = self.fakerootlogs 238 cachedata.fakerootlogs[fn] = self.fakerootlogs
239 cachedata.extradepsfunc[fn] = self.extradepsfunc 239 cachedata.extradepsfunc[fn] = self.extradepsfunc
240 240
241
242class SiggenRecipeInfo(RecipeInfoCommon):
243 __slots__ = ()
244
245 classname = "SiggenRecipeInfo"
246 cachefile = "bb_cache_" + classname +".dat"
247 # we don't want to show this information in graph files so don't set cachefields
248 #cachefields = []
249
250 def __init__(self, filename, metadata):
251 self.siggen_gendeps = metadata.getVar("__siggen_gendeps", False)
252 self.siggen_varvals = metadata.getVar("__siggen_varvals", False)
253 self.siggen_taskdeps = metadata.getVar("__siggen_taskdeps", False)
254
255 @classmethod
256 def init_cacheData(cls, cachedata):
257 cachedata.siggen_taskdeps = {}
258 cachedata.siggen_gendeps = {}
259 cachedata.siggen_varvals = {}
260
261 def add_cacheData(self, cachedata, fn):
262 cachedata.siggen_gendeps[fn] = self.siggen_gendeps
263 cachedata.siggen_varvals[fn] = self.siggen_varvals
264 cachedata.siggen_taskdeps[fn] = self.siggen_taskdeps
265
241def virtualfn2realfn(virtualfn): 266def virtualfn2realfn(virtualfn):
242 """ 267 """
243 Convert a virtual file name to a real one + the associated subclass keyword 268 Convert a virtual file name to a real one + the associated subclass keyword