diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-01 11:25:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-01 18:02:12 +0000 |
commit | 758f18167f2ed50576265a0bab7ec529c69656fa (patch) | |
tree | 792419f4d330faca2cf67c65a4297f2066b55b70 /meta/classes/staging.bbclass | |
parent | ec3d83f9a90288403b96be25da855fa280aadd8d (diff) | |
download | poky-758f18167f2ed50576265a0bab7ec529c69656fa.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.
(From OE-Core rev: 3b0af8dc0f796345d1f1ba77ea35bbd090a5feb3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/staging.bbclass')
-rw-r--r-- | meta/classes/staging.bbclass | 11 |
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() { | |||
441 | bb.note("Direct dependencies are %s" % str(configuredeps)) | 441 | bb.note("Direct dependencies are %s" % str(configuredeps)) |
442 | #bb.note(" or %s" % str(start)) | 442 | #bb.note(" or %s" % str(start)) |
443 | 443 | ||
444 | msgbuf = [] | ||
444 | # Call into setscene_depvalid for each sub-dependency and only copy sysroot files | 445 | # Call into setscene_depvalid for each sub-dependency and only copy sysroot files |
445 | # for ones that would be restored from sstate. | 446 | # for ones that would be restored from sstate. |
446 | done = list(start) | 447 | done = list(start) |
@@ -455,19 +456,21 @@ python extend_recipe_sysroot() { | |||
455 | taskdeps = {} | 456 | taskdeps = {} |
456 | taskdeps[dep] = setscenedeps[dep][:2] | 457 | taskdeps[dep] = setscenedeps[dep][:2] |
457 | taskdeps[datadep] = setscenedeps[datadep][:2] | 458 | taskdeps[datadep] = setscenedeps[datadep][:2] |
458 | retval = setscene_depvalid(datadep, taskdeps, [], d) | 459 | retval = setscene_depvalid(datadep, taskdeps, [], d, msgbuf) |
459 | if retval: | 460 | if retval: |
460 | bb.note("Skipping setscene dependency %s for installation into the sysroot" % datadep) | 461 | msgbuf.append("Skipping setscene dependency %s for installation into the sysroot") |
461 | continue | 462 | continue |
462 | done.append(datadep) | 463 | done.append(datadep) |
463 | new.append(datadep) | 464 | new.append(datadep) |
464 | if datadep not in configuredeps and setscenedeps[datadep][1] == "do_populate_sysroot": | 465 | if datadep not in configuredeps and setscenedeps[datadep][1] == "do_populate_sysroot": |
465 | configuredeps.append(datadep) | 466 | configuredeps.append(datadep) |
466 | bb.note("Adding dependency on %s" % setscenedeps[datadep][0]) | 467 | msgbuf.append("Adding dependency on %s" % setscenedeps[datadep][0]) |
467 | else: | 468 | else: |
468 | bb.note("Following dependency on %s" % setscenedeps[datadep][0]) | 469 | msgbuf.append("Following dependency on %s" % setscenedeps[datadep][0]) |
469 | next = new | 470 | next = new |
470 | 471 | ||
472 | bb.note("\n".join(msgbuf)) | ||
473 | |||
471 | stagingdir = d.getVar("STAGING_DIR") | 474 | stagingdir = d.getVar("STAGING_DIR") |
472 | recipesysroot = d.getVar("RECIPE_SYSROOT") | 475 | recipesysroot = d.getVar("RECIPE_SYSROOT") |
473 | recipesysrootnative = d.getVar("RECIPE_SYSROOT_NATIVE") | 476 | recipesysrootnative = d.getVar("RECIPE_SYSROOT_NATIVE") |