| Message ID | 20261202063219.3544589-1-ragaprasanth@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | utils: fix NameError in profile_function() | expand |
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 046bf4b..6210db2 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -1488,7 +1488,7 @@ def profile_function(profile, function, output_fn, process=True): prof.dump_stats(output_fn) if process: process_profilelog(output_fn) - serverlog("Raw profiling information saved to %s and processed statistics to %s.report*" % (output_fn, output_fn)) + bb.server.process.serverlog("Raw profiling information saved to %s and processed statistics to %s.report*" % (output_fn, output_fn)) return ret else: return function()
With "bitbake -P main" (or "-P idle") the profile is written, but the server then fails with "NameError: name 'serverlog' is not defined", because serverlog() is in bb.server.process. Call it from there, as bb.utils already does elsewhere. Tested with "bitbake -P main -p": the server now exits cleanly and logs where the profile was saved. AI-Generated: Uses Claude Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp> --- lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)