aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/staging.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-01 11:25:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-01 18:02:07 +0000
commit3b0af8dc0f796345d1f1ba77ea35bbd090a5feb3 (patch)
tree084c54d7e5a503d074a77bcca7408f2836fbe752 /meta/classes/staging.bbclass
parent1a1e70304932cce5ad194e0a7ebb495da7b24c2e (diff)
downloadopenembedded-core-contrib-3b0af8dc0f796345d1f1ba77ea35bbd090a5feb3.tar.gz
sstate/staging: Batch log messages for performance
According to profile data, repeated calls to bb.debug and bb.note in the extend_recipe_sysroot() codepath were accounting for 75% of the time (1.5s) in calls from tasks like do_image_complete. This batches up the log messages into one call into the logging system which gives similar behaviour to disabling the logging but retains the debug information. Since setscene_depvalid is also called from bitbake's setscene code, we have to be a little creative with the function parameters and leave the other debug output mechanism in place. This should hopefully speed up recipe specific sysroots. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/staging.bbclass')
-rw-r--r--meta/classes/staging.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index b9c84a4057..35e53fe2b2 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -441,6 +441,7 @@ python extend_recipe_sysroot() {
bb.note("Direct dependencies are %s" % str(configuredeps))
#bb.note(" or %s" % str(start))
+ msgbuf = []
# Call into setscene_depvalid for each sub-dependency and only copy sysroot files
# for ones that would be restored from sstate.
done = list(start)
@@ -455,19 +456,21 @@ python extend_recipe_sysroot() {
taskdeps = {}
taskdeps[dep] = setscenedeps[dep][:2]
taskdeps[datadep] = setscenedeps[datadep][:2]
- retval = setscene_depvalid(datadep, taskdeps, [], d)
+ retval = setscene_depvalid(datadep, taskdeps, [], d, msgbuf)
if retval:
- bb.note("Skipping setscene dependency %s for installation into the sysroot" % datadep)
+ msgbuf.append("Skipping setscene dependency %s for installation into the sysroot")
continue
done.append(datadep)
new.append(datadep)
if datadep not in configuredeps and setscenedeps[datadep][1] == "do_populate_sysroot":
configuredeps.append(datadep)
- bb.note("Adding dependency on %s" % setscenedeps[datadep][0])
+ msgbuf.append("Adding dependency on %s" % setscenedeps[datadep][0])
else:
- bb.note("Following dependency on %s" % setscenedeps[datadep][0])
+ msgbuf.append("Following dependency on %s" % setscenedeps[datadep][0])
next = new
+ bb.note("\n".join(msgbuf))
+
stagingdir = d.getVar("STAGING_DIR")
recipesysroot = d.getVar("RECIPE_SYSROOT")
recipesysrootnative = d.getVar("RECIPE_SYSROOT_NATIVE")