summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
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 17:03:13 +0000
commit4e3ab56b9f9f7cb9fb63f99938dd6eed1793c0ff (patch)
treef7eba9f3f7703296344cac4c110224fc3db49bd6 /bitbake/lib/bb/cooker.py
parentbb1f8f0891941db408affde8a93fe8f2542c1a17 (diff)
downloadpoky-4e3ab56b9f9f7cb9fb63f99938dd6eed1793c0ff.tar.gz
bitbake: 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. (Bitbake rev: 92f61dfe409da2fdd7c609cf1125878aad273d04) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 8e32af30e4..db52964c3a 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -175,18 +175,31 @@ class BBCooker:
175 175
176 self.configuration = configuration 176 self.configuration = configuration
177 177
178 bb.debug(1, "BBCooker starting %s" % time.time())
179 sys.stdout.flush()
180
178 self.configwatcher = pyinotify.WatchManager() 181 self.configwatcher = pyinotify.WatchManager()
182 bb.debug(1, "BBCooker pyinotify1 %s" % time.time())
183 sys.stdout.flush()
184
179 self.configwatcher.bbseen = [] 185 self.configwatcher.bbseen = []
180 self.configwatcher.bbwatchedfiles = [] 186 self.configwatcher.bbwatchedfiles = []
181 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications) 187 self.confignotifier = pyinotify.Notifier(self.configwatcher, self.config_notifications)
188 bb.debug(1, "BBCooker pyinotify2 %s" % time.time())
189 sys.stdout.flush()
182 self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \ 190 self.watchmask = pyinotify.IN_CLOSE_WRITE | pyinotify.IN_CREATE | pyinotify.IN_DELETE | \
183 pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \ 191 pyinotify.IN_DELETE_SELF | pyinotify.IN_MODIFY | pyinotify.IN_MOVE_SELF | \
184 pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO 192 pyinotify.IN_MOVED_FROM | pyinotify.IN_MOVED_TO
185 self.watcher = pyinotify.WatchManager() 193 self.watcher = pyinotify.WatchManager()
194 bb.debug(1, "BBCooker pyinotify3 %s" % time.time())
195 sys.stdout.flush()
186 self.watcher.bbseen = [] 196 self.watcher.bbseen = []
187 self.watcher.bbwatchedfiles = [] 197 self.watcher.bbwatchedfiles = []
188 self.notifier = pyinotify.Notifier(self.watcher, self.notifications) 198 self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
189 199
200 bb.debug(1, "BBCooker pyinotify complete %s" % time.time())
201 sys.stdout.flush()
202
190 # If being called by something like tinfoil, we need to clean cached data 203 # If being called by something like tinfoil, we need to clean cached data
191 # which may now be invalid 204 # which may now be invalid
192 bb.parse.clear_cache() 205 bb.parse.clear_cache()
@@ -196,6 +209,9 @@ class BBCooker:
196 209
197 self.initConfigurationData() 210 self.initConfigurationData()
198 211
212 bb.debug(1, "BBCooker parsed base configuration %s" % time.time())
213 sys.stdout.flush()
214
199 # we log all events to a file if so directed 215 # we log all events to a file if so directed
200 if self.configuration.writeeventlog: 216 if self.configuration.writeeventlog:
201 # register the log file writer as UI Handler 217 # register the log file writer as UI Handler
@@ -233,6 +249,9 @@ class BBCooker:
233 # Let SIGHUP exit as SIGTERM 249 # Let SIGHUP exit as SIGTERM
234 signal.signal(signal.SIGHUP, self.sigterm_exception) 250 signal.signal(signal.SIGHUP, self.sigterm_exception)
235 251
252 bb.debug(1, "BBCooker startup complete %s" % time.time())
253 sys.stdout.flush()
254
236 def process_inotify_updates(self): 255 def process_inotify_updates(self):
237 for n in [self.confignotifier, self.notifier]: 256 for n in [self.confignotifier, self.notifier]:
238 if n.check_events(timeout=0): 257 if n.check_events(timeout=0):