summaryrefslogtreecommitdiffstats
path: root/bitbake/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:28 +0000
commit16bc168084cc7b9a092385dfb02d5efc012bed5b (patch)
treeabd75154e3670b7536b7e7103854bbfbeb01e511 /bitbake/bin
parent82b5cdad0f8f5a511545b613410895e1a93840a1 (diff)
downloadpoky-16bc168084cc7b9a092385dfb02d5efc012bed5b.tar.gz
bitbake: 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. (Bitbake rev: c97c1f1c127ef3f8fbbd1b4e187ab58bfb0a73e5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake-server7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-server b/bitbake/bin/bitbake-server
index f53f88b6b0..825e9d56af 100755
--- a/bitbake/bin/bitbake-server
+++ b/bitbake/bin/bitbake-server
@@ -16,7 +16,7 @@ if sys.getfilesystemencoding() != "utf-8":
16 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.") 16 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.")
17 17
18# Users shouldn't be running this code directly 18# Users shouldn't be running this code directly
19if len(sys.argv) != 10 or not sys.argv[1].startswith("decafbad"): 19if len(sys.argv) != 11 or not sys.argv[1].startswith("decafbad"):
20 print("bitbake-server is meant for internal execution by bitbake itself, please don't use it standalone.") 20 print("bitbake-server is meant for internal execution by bitbake itself, please don't use it standalone.")
21 sys.exit(1) 21 sys.exit(1)
22 22
@@ -28,7 +28,8 @@ logfile = sys.argv[4]
28lockname = sys.argv[5] 28lockname = sys.argv[5]
29sockname = sys.argv[6] 29sockname = sys.argv[6]
30timeout = float(sys.argv[7]) 30timeout = float(sys.argv[7])
31xmlrpcinterface = (sys.argv[8], int(sys.argv[9])) 31profile = bool(int(sys.argv[8]))
32xmlrpcinterface = (sys.argv[9], int(sys.argv[10]))
32if xmlrpcinterface[0] == "None": 33if xmlrpcinterface[0] == "None":
33 xmlrpcinterface = (None, xmlrpcinterface[1]) 34 xmlrpcinterface = (None, xmlrpcinterface[1])
34 35
@@ -49,5 +50,5 @@ logger = logging.getLogger("BitBake")
49handler = bb.event.LogHandler() 50handler = bb.event.LogHandler()
50logger.addHandler(handler) 51logger.addHandler(handler)
51 52
52bb.server.process.execServer(lockfd, readypipeinfd, lockname, sockname, timeout, xmlrpcinterface) 53bb.server.process.execServer(lockfd, readypipeinfd, lockname, sockname, timeout, xmlrpcinterface, profile)
53 54