From patchwork Wed Dec 2 06:32:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasanth R X-Patchwork-Id: 106921 Received: from mail-dl1-f43.google.com (mail-dl1-f43.google.com [74.125.82.43]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.30860.1796193148300129843 for ; Tue, 01 Dec 2026 22:32:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=l99jltSu; spf=pass (domain: gmail.com, ip: 74.125.82.43, mailfrom: ragaprasanth@gmail.com) Received: by mail-dl1-f43.google.com with SMTP id a92af1059eb24-1a3c08d6928so19551329c88.0 for ; Tue, 01 Dec 2026 22:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796193147; x=1796797947; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=7OfaH4tRN2XRXMo8bkQmw2pOJjxHtglXNXzIyYEcKLk=; b=l99jltSubfKb0lJrbywMlYDsry80CL1ip4S7NGdM8Ys03ntVe6GtRjV7lPJ52dO/pq vGet4Lzoafpl2Hvvd5XX2p+CdQ9AQY18BSPi1lsMaOUpbuMEaUmBsWRG9y+i828tywN4 TFolaliGua6Z58m5GuHHEGwMe/ugM5ZKby/hIeVTFECB2zbvEuwwijPihdu4ZgZH2xUy z/+jbq4ag6IeCW4VTLMEEFIB+NhJn+h4Lq5n06HKk5fD+nBE3nfeaSpzetxa7CfGV2ci JrCOUxPK24mNfwzYq13k7KdM2hYQYe7gL/XYNVD6kGg9k6Zs2lBXeKAlf2c40zhbA3U7 1nIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796193147; x=1796797947; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7OfaH4tRN2XRXMo8bkQmw2pOJjxHtglXNXzIyYEcKLk=; b=qSWb0jd5X/hysrBoTEOPIa20aU/lanA1nrshcIeEGI0QFGWiylZZnb/H0DHza4iBVQ 5U6UJYwyL+QNxKIkTg4Vpd6j++yRJZrvsIBu8PvjTbKZ4mbaXczUowy1g34nLpareb8F 9kS9YTOBxPBc2qC4SMiFMQeZHgK1uP5V1024Oty9888or0Eb1OKddt4+0sGBNb6zU7D1 DnlSEW+pqL7T6WxXVgMy4SniET5s2IWRKKCVsGLYxk6bi+kqgaecO8nzyjwWsMsgrdKb dJAJC8TfmCxDqsfH/GkvZAdjx7hWMwud/c2oO+0myaNryRizdu+YmYjOoDnizty1Hvhs oH2w== X-Gm-Message-State: APuU4Z/N2ReruWA0nUhJKR+c74MH7kRLczgSuEVVUW+dIKFRLTfp4qww EiAErvPKLgiCbmBaFcy/smT7MNpr/wGsxQghwNX2fX000EssWwmeD9gGwY3iBw== X-Gm-Gg: AZFdTZeZpDi7IMh5fdU3XTOXYYSR+sCLFMeq7eFy4I1+eCAu0GqvxmTnagTj6BoPWCh VqneV7LYd7x8TXBLsz0c8uG8lXBOqH0t1ejnc7+smPjMCutKdG6JTPdwtVmr/PvKewzxzbdyUwX k4Af8ozgKGCLO7hUkldCQp26FOFBcEeqIWPZ20/Z6wAQ6vEXoT0pnt4MXB9FerEvNIRcK6kbKMx OszSNlH8mKX3O/9q8wY/1GIUUF4RbR5YIR2ehgW4qaMMqhHIf4h6yvCdbjRSufJgXgoxdZgGDiS nos50cYQ+9pTAuGbW85aPrmNxOlR8hxpWTD9f2x86IOtIhyTaDMNz9MuzsO4VSmh4vmg7W5IeDw D2WGveD1V6TWAb4/vb4xeL0jM/nKZ6ZAqMyBToQM89OnvjzTX3lPTkKD5Dj8WGUH9kDIns6xUnr LYiEvJRhtxk6B8x/vgsgzbZkeWh/JYI6W630YzCS+8uOTVwU+8+KnG9evQsT57RSryDggFIiR4U rHN12e2mZ/T2nLinN6Jyt2fYdoJbE9pdKsQm0qw4As9tQRP8g8OX2v8jDwVJLA5fL/yKjKVfBGU Ov44clrOBvlYgWQ5UW18VdvX4/xqyohvik7nzPK4jt/RnMchvK2uP27rXobZxrMteFUF3ce5KVY T2nkxksiQJuk= X-Received: by 2002:a05:693c:8817:20b0:387:312c:1d5f with SMTP id 5a478bee46e88-387312c1dccmr1461399eec.21.1796193147532; Tue, 01 Dec 2026 22:32:27 -0800 (PST) Return-Path: Received: from prasanth.alps.lineo.co.jp (vpn1.lineo.co.jp. [203.141.200.204]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-386c7c62a91sm76667738eec.17.2026.12.01.22.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 22:32:27 -0800 (PST) From: Prasanth R To: bitbake-devel@lists.openembedded.org Cc: Prasanth R Subject: [PATCH] utils: fix NameError in profile_function() Date: Wed, 2 Dec 2026 15:32:19 +0900 Message-Id: <20261202063219.3544589-1-ragaprasanth@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Wed, 02 Dec 2026 06:32:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/20512 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 --- lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()