summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-30 10:35:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-31 16:56:25 +0100
commit277e07d1cc83abf66c9088e4a5d9594b2603492d (patch)
tree7c646fe69e440240260b779faf8802f1d9e013ed
parenteacebfc1696a5690753ee28cf17f3380c316749a (diff)
downloadpoky-277e07d1cc83abf66c9088e4a5d9594b2603492d.tar.gz
bitbake: cooker: Improve handling errors during parsing when profiling
We've seeing profiling tracebacks when parse errors occur during profiling. Try and avoid these but not processing invalid profiles. (Bitbake rev: 171bd9dd575307fbd61b5179ad86131d76add067) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/cooker.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 255b9f199a..673af8daec 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2236,12 +2236,13 @@ class CookerParser(object):
2236 profiles = [] 2236 profiles = []
2237 for i in self.process_names: 2237 for i in self.process_names:
2238 logfile = "profile-parse-%s.log" % i 2238 logfile = "profile-parse-%s.log" % i
2239 if os.path.exists(logfile): 2239 if os.path.exists(logfile) and os.path.getsize(logfile):
2240 profiles.append(logfile) 2240 profiles.append(logfile)
2241 2241
2242 pout = "profile-parse.log.processed" 2242 if profiles:
2243 bb.utils.process_profilelog(profiles, pout = pout) 2243 pout = "profile-parse.log.processed"
2244 print("Processed parsing statistics saved to %s" % (pout)) 2244 bb.utils.process_profilelog(profiles, pout = pout)
2245 print("Processed parsing statistics saved to %s" % (pout))
2245 2246
2246 def final_cleanup(self): 2247 def final_cleanup(self):
2247 if self.syncthread: 2248 if self.syncthread: