diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-09 17:55:45 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-10 11:10:00 -0700 |
commit | aadfea6be629a17e4e26747aba4f59f5ac8e7558 (patch) | |
tree | b9491516757b2243b56b1b7b1cbf7e06770f435e /bitbake/lib/bb | |
parent | 0b4ae1c7742cec14395a0d845e1ed42b88b0e215 (diff) | |
download | poky-aadfea6be629a17e4e26747aba4f59f5ac8e7558.tar.gz |
bitbake: providers/runqueue/taskdata: Optimise logger.debug calls
A run of "bitbake bash -c unpack" when the task has already been
completed resulted in about 9000 calls to logger.debug(). With this
patch which comments out some noisy/less usefull logging and moves
other logging calls outside loops, this number is reduced to 1000
calls. This results in cleaner logs and gives a small but
measurable 0.15s speedup. The log size dropped from 900kb to 160kb.
(Bitbake rev: d2677f084fe1d8846db77d89ef5e6ffb18dc171a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/providers.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/taskdata.py | 12 |
3 files changed, 11 insertions, 5 deletions
diff --git a/bitbake/lib/bb/providers.py b/bitbake/lib/bb/providers.py index 3a4f6040a5..637e1fab96 100644 --- a/bitbake/lib/bb/providers.py +++ b/bitbake/lib/bb/providers.py | |||
@@ -325,7 +325,7 @@ def filterProvidersRunTime(providers, item, cfgData, dataCache): | |||
325 | provides = dataCache.pn_provides[pn] | 325 | provides = dataCache.pn_provides[pn] |
326 | for provide in provides: | 326 | for provide in provides: |
327 | prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % provide, True) | 327 | prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % provide, True) |
328 | logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys()) | 328 | #logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys()) |
329 | if prefervar in pns and pns[prefervar] not in preferred: | 329 | if prefervar in pns and pns[prefervar] not in preferred: |
330 | var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar) | 330 | var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar) |
331 | logger.verbose("selecting %s to satisfy runtime %s due to %s", prefervar, item, var) | 331 | logger.verbose("selecting %s to satisfy runtime %s due to %s", prefervar, item, var) |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 7d3e91a743..c486c988e2 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -481,7 +481,7 @@ class RunQueueData: | |||
481 | fn = taskData.fn_index[fnid] | 481 | fn = taskData.fn_index[fnid] |
482 | task_deps = self.dataCache.task_deps[fn] | 482 | task_deps = self.dataCache.task_deps[fn] |
483 | 483 | ||
484 | logger.debug(2, "Processing %s:%s", fn, taskData.tasks_name[task]) | 484 | #logger.debug(2, "Processing %s:%s", fn, taskData.tasks_name[task]) |
485 | 485 | ||
486 | if fnid not in taskData.failed_fnids: | 486 | if fnid not in taskData.failed_fnids: |
487 | 487 | ||
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py index 58fe1995f2..af72a1fb09 100644 --- a/bitbake/lib/bb/taskdata.py +++ b/bitbake/lib/bb/taskdata.py | |||
@@ -207,23 +207,29 @@ class TaskData: | |||
207 | if not fnid in self.depids: | 207 | if not fnid in self.depids: |
208 | dependids = {} | 208 | dependids = {} |
209 | for depend in dataCache.deps[fn]: | 209 | for depend in dataCache.deps[fn]: |
210 | logger.debug(2, "Added dependency %s for %s", depend, fn) | ||
211 | dependids[self.getbuild_id(depend)] = None | 210 | dependids[self.getbuild_id(depend)] = None |
212 | self.depids[fnid] = dependids.keys() | 211 | self.depids[fnid] = dependids.keys() |
212 | logger.debug(2, "Added dependencies %s for %s", str(dataCache.deps[fn]), fn) | ||
213 | 213 | ||
214 | # Work out runtime dependencies | 214 | # Work out runtime dependencies |
215 | if not fnid in self.rdepids: | 215 | if not fnid in self.rdepids: |
216 | rdependids = {} | 216 | rdependids = {} |
217 | rdepends = dataCache.rundeps[fn] | 217 | rdepends = dataCache.rundeps[fn] |
218 | rrecs = dataCache.runrecs[fn] | 218 | rrecs = dataCache.runrecs[fn] |
219 | rdependlist = [] | ||
220 | rreclist = [] | ||
219 | for package in rdepends: | 221 | for package in rdepends: |
220 | for rdepend in rdepends[package]: | 222 | for rdepend in rdepends[package]: |
221 | logger.debug(2, "Added runtime dependency %s for %s", rdepend, fn) | 223 | rdependlist.append(rdepend) |
222 | rdependids[self.getrun_id(rdepend)] = None | 224 | rdependids[self.getrun_id(rdepend)] = None |
223 | for package in rrecs: | 225 | for package in rrecs: |
224 | for rdepend in rrecs[package]: | 226 | for rdepend in rrecs[package]: |
225 | logger.debug(2, "Added runtime recommendation %s for %s", rdepend, fn) | 227 | rreclist.append(rdepend) |
226 | rdependids[self.getrun_id(rdepend)] = None | 228 | rdependids[self.getrun_id(rdepend)] = None |
229 | if rdependlist: | ||
230 | logger.debug(2, "Added runtime dependencies %s for %s", str(rdependlist), fn) | ||
231 | if rreclist: | ||
232 | logger.debug(2, "Added runtime recommendations %s for %s", str(rreclist), fn) | ||
227 | self.rdepids[fnid] = rdependids.keys() | 233 | self.rdepids[fnid] = rdependids.keys() |
228 | 234 | ||
229 | for dep in self.depids[fnid]: | 235 | for dep in self.depids[fnid]: |