diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-07 12:28:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-08 17:17:37 +0000 |
commit | 89e2d2835d5001eee1c7da1bdaab64e9438fc63a (patch) | |
tree | aed621341de74c86cc460560cb4eb33c60a4ed36 /bitbake/lib | |
parent | 55197b853d182911430ba141aca2c3ece07ba475 (diff) | |
download | poky-89e2d2835d5001eee1c7da1bdaab64e9438fc63a.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: 8d1fc115b8a176009f1f3a8ce840b422e7e0b45e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 16681ba244..18979362b6 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): |