aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-17 15:19:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-20 08:31:24 +0000
commitc97c1f1c127ef3f8fbbd1b4e187ab58bfb0a73e5 (patch)
tree08fa29bbeb01b02123ce45776d4015b658076a4b /bin
parent6b24efc0f4d19738d96754280e70bc493005167d (diff)
downloadbitbake-c97c1f1c127ef3f8fbbd1b4e187ab58bfb0a73e5.tar.gz
server: Ensure cooker profiling works
The previous cleanups meant that when the cooker was started, profiling was always disabled as configuration was sent to the server later and this was too late to profile the main loop. Pass the "profile" option over the server commandline so that we can profile cooker itself again, the setting can now take effect early enough. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake-server7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/bitbake-server b/bin/bitbake-server
index f53f88b6b..825e9d56a 100755
--- a/bin/bitbake-server
+++ b/bin/bitbake-server
@@ -16,7 +16,7 @@ if sys.getfilesystemencoding() != "utf-8":
sys.exit("Please use a locale setting which supports UTF-8 (such as LANG=en_US.UTF-8).\nPython can't change the filesystem locale after loading so we need a UTF-8 when Python starts or things won't work.")
# Users shouldn't be running this code directly
-if len(sys.argv) != 10 or not sys.argv[1].startswith("decafbad"):
+if len(sys.argv) != 11 or not sys.argv[1].startswith("decafbad"):
print("bitbake-server is meant for internal execution by bitbake itself, please don't use it standalone.")
sys.exit(1)
@@ -28,7 +28,8 @@ logfile = sys.argv[4]
lockname = sys.argv[5]
sockname = sys.argv[6]
timeout = float(sys.argv[7])
-xmlrpcinterface = (sys.argv[8], int(sys.argv[9]))
+profile = bool(int(sys.argv[8]))
+xmlrpcinterface = (sys.argv[9], int(sys.argv[10]))
if xmlrpcinterface[0] == "None":
xmlrpcinterface = (None, xmlrpcinterface[1])
@@ -49,5 +50,5 @@ logger = logging.getLogger("BitBake")
handler = bb.event.LogHandler()
logger.addHandler(handler)
-bb.server.process.execServer(lockfd, readypipeinfd, lockname, sockname, timeout, xmlrpcinterface)
+bb.server.process.execServer(lockfd, readypipeinfd, lockname, sockname, timeout, xmlrpcinterface, profile)