aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-07 12:28:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-28 16:58:54 +0000
commit92f61dfe409da2fdd7c609cf1125878aad273d04 (patch)
treed538c8b0f696da6000e883b55f12572042b870c1
parent492a5c1b32bee1f5d7978954ee0ebdf4fccdf56f (diff)
downloadbitbake-contrib-92f61dfe409da2fdd7c609cf1125878aad273d04.tar.gz
cooker: Add some timing debug messages to the server startup
We're seeing slow startup in bitbake, add some timeing debug messages so the logs are more useful for debugging when its slow. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cooker.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 8e32af30e..db52964c3 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -175,18 +175,31 @@ class BBCooker:
self.configuration = configuration
+ bb.debug(1, "BBCooker starting %s" % time.time())
+ sys.stdout.flush()
+
self.configwatcher = pyinotify.WatchManager()
+ bb.debug(1, "BBCooker pyinotify1 %s" % time.time())
+ sys.stdout.flush()
+
self.configwatcher.bbseen = []
self.configwatcher.bbwatchedfiles = []
self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
+ bb.debug(1, "BBCooker pyinotify2 %s" % time.time())
+ sys.stdout.flush()
self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \
pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \
pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO
self.watcher = pyinotify.WatchManager()
+ bb.debug(1, "BBCooker pyinotify3 %s" % time.time())
+ sys.stdout.flush()
self.watcher.bbseen = []
self.watcher.bbwatchedfiles = []
self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
+ bb.debug(1, "BBCooker pyinotify complete %s" % time.time())
+ sys.stdout.flush()
+
# If being called by something like tinfoil, we need to clean cached data
# which may now be invalid
bb.parse.clear_cache()
@@ -196,6 +209,9 @@ class BBCooker:
self.initConfigurationData()
+ bb.debug(1, "BBCooker parsed base configuration %s" % time.time())
+ sys.stdout.flush()
+
# we log all events to a file if so directed
if self.configuration.writeeventlog:
# register the log file writer as UI Handler
@@ -233,6 +249,9 @@ class BBCooker:
# Let SIGHUP exit as SIGTERM
signal.signal(signal.SIGHUP, self.sigterm_exception)
+ bb.debug(1, "BBCooker startup complete %s" % time.time())
+ sys.stdout.flush()
+
def process_inotify_updates(self):
for n in [self.confignotifier, self.notifier]:
if n.check_events(timeout=0):