aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-26 10:32:19 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-05-17 10:10:46 +0300
commitf72f3ecfb77c032ad3f3ff0c23cb18c53f01c170 (patch)
treefe5f9a0d0033e9feb0ca4cf7227693fdd2dae674 /meta/recipes-devtools
parentfb228884ea5b90a436a378e101300f4d4d4c359c (diff)
downloadopenembedded-core-contrib-f72f3ecfb77c032ad3f3ff0c23cb18c53f01c170.tar.gz
python-pgo-image: enable sstate for do_profile
There are caveats however, basically because of the circular dependency between python-pgo-image and python (python is a build dep of python-pgo-image, and at the same time, depends on the profile data generated by python-pgo-image). In practice the sstate data is only used when no profile data is yet present. Existing profile data (i.e. non-empty PYTHON_PROFILE_DIR) changes signature hash of python which, in turn, changes signature of python-pgo-image and causes a sstate signature mismatch and rebuild of python-pgo-image. Thus, in order to utilize sstate data the user should run "bitbake python-pgo-image -c clean" (or otherwise wipe pre-existing profile data) before running "bitbake python-pgo-image -c profile". [YOCTO #9338] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/images/python-pgo-image.bb15
1 files changed, 13 insertions, 2 deletions
diff --git a/meta/recipes-devtools/images/python-pgo-image.bb b/meta/recipes-devtools/images/python-pgo-image.bb
index 33aa9a1fec..05252a1a46 100644
--- a/meta/recipes-devtools/images/python-pgo-image.bb
+++ b/meta/recipes-devtools/images/python-pgo-image.bb
@@ -9,6 +9,7 @@ LICENSE = "MIT"
inherit core-image
PYTHON_PROFILE_DIR ?= "${TMPDIR}/work-shared/${MACHINE}/python/pgo-data"
+PROFILE_DATA_WORKDIR = "${WORKDIR}/profile-data"
#PYTHON_PROFILE_TASK_DEFAULT = "-m test.regrtest --pgo -w -x test_asyncore test_gdb test_multiprocessing test_subprocess"
## Exclude tests that are segfaulting on qemux86 target
#PYTHON_PROFILE_TASK_DEFAULT += "test_bytes test_str test_string test_tuple test_unicode test_userstring test_xmlrpc"
@@ -48,7 +49,7 @@ python do_profile() {
bb.fatal("Failed to archive profile data on target: %s" % output)
# Retrieve and unpack profile data
- profile_dir = d.getVar("PYTHON_PROFILE_DIR", True)
+ profile_dir = d.getVar("PROFILE_DATA_WORKDIR", True)
target.copy_from('/home/root/pgo-data.tgz', profile_dir)
profile_tarball = os.path.join(profile_dir, 'pgo-data.tgz')
@@ -68,4 +69,14 @@ python do_profile() {
addtask profile after do_build
do_profile[depends] += "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
-do_profile[cleandirs] = "${PYTHON_PROFILE_DIR}"
+do_profile[cleandirs] = "${PROFILE_DATA_WORKDIR}"
+
+
+python do_profile_setscene () {
+ sstate_setscene(d)
+}
+
+SSTATETASKS += "do_profile"
+do_profile[sstate-inputdirs] = "${PROFILE_DATA_WORKDIR}"
+do_profile[sstate-outputdirs] = "${PYTHON_PROFILE_DIR}"
+addtask do_profile_setscene