From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH RFC 00/10] python3: support profile-optimized build
Date: Fri, 27 Jan 2017 12:13:21 +0200 [thread overview]
Message-ID: <20170127101331.14389-1-markus.lehtonen@linux.intel.com> (raw)
This patchset implements profile-guided-optimization (PGO) for Python 3. The
implementation is very similar to my previous patchset for Python 2.7.
PGO for python3-native is one simple patch. PGO for target python3 is more
complicated and follows the lines of Python 2.7:
1. add new python-profile-opt3 recipe that is a special version of python3
with profile instrumentation enabled
2. add new do_profile3 in python-pgo-image for running the python3 profile task
in the target
3. enable usage of profile data in python3 do_compile
Configration variables for controlling the feature are:
PYTHON3_PROFILE_OPT - set to "1" to enable PGO on python3
PYTHON3_PROFILE_TASK - profile task to run for python3
PYTHON3_NATIVE_PROFILE_OPT - set to "1" to enable PGO on python3-native
PYTHON3_NATIVE_PROFILE_TASK - profile task to run for python3-native
Benchmark results from my i7-3770K are found below.
python3-native:
pystone: 118288 -> 138026 pystones/s (+17%)
pybench avg: 3428 -> 3118 ms (-9%)
regrtest time: 598 -> 550 s (-8%)
python3 (target):
pystone: 1531 -> 1616 pystones/s (+5.5%)
pybench avg: 215901 -> 207498 ms (-3.9%)
regrtest time: 8355 -> 8157 (-2.4%)
Again, these are just ballpark figures from few test runs.
The following changes since commit ccf50ba2e045b7b690a10633710872845a63943f:
python-pgo-image: enable sstate for do_profile (2017-01-24 15:23:49 +0200)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib marquiz/fixes-9338-py3
http://git.openembedded.org/openembedded-core-contrib/log/?h=marquiz/fixes-9338-py3
Markus Lehtonen (10):
python3-native: support profile optimized build
python3: fix depends of python-tests
python3: add python-profile-opt3 recipe
python-pgo-image: profiling for python3
python3: remove two setup.py cross-compile hacks
python3: support profile optimized build
python3: fix profile-optimized build of modules
python-pgo-image: exclude tests from the python3 profile target
python3: add python3-tools subpackage
python-pgo-image: change python3 profile target to pybench
meta/recipes-devtools/images/python-pgo-image.bb | 61 +++++++++--
.../python/python-3.5-manifest.inc | 10 +-
meta/recipes-devtools/python/python-profile-opt3 | 1 +
.../python/python-profile-opt3_3.5.2.bb | 15 +++
.../python/python3-native_3.5.2.bb | 9 ++
.../python/python3/000-cross-compile.patch | 9 --
...efile-add-install_generate_profile-target.patch | 25 +++++
...-CFLAGS-for-extensions-when-cross-compili.patch | 56 +++++++++++
.../python3-setup.py-no-host-headers-libs.patch | 33 ------
...name-libpython3-to-libpython-profile-opt3.patch | 111 +++++++++++++++++++++
.../setup.py-find-libraries-in-staging-dirs.patch | 30 ------
meta/recipes-devtools/python/python3_3.5.2.bb | 74 ++++++++++----
12 files changed, 325 insertions(+), 109 deletions(-)
create mode 120000 meta/recipes-devtools/python/python-profile-opt3
create mode 100644 meta/recipes-devtools/python/python-profile-opt3_3.5.2.bb
create mode 100644 meta/recipes-devtools/python/python3/Makefile-add-install_generate_profile-target.patch
create mode 100644 meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
delete mode 100644 meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
create mode 100644 meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch
delete mode 100644 meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
--
2.10.2
next reply other threads:[~2017-01-27 10:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 10:13 Markus Lehtonen [this message]
2017-01-27 10:13 ` [PATCH RFC 01/10] python3-native: support profile optimized build Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 02/10] python3: fix depends of python-tests Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 03/10] python3: add python-profile-opt3 recipe Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 04/10] python-pgo-image: profiling for python3 Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 05/10] python3: remove two setup.py cross-compile hacks Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 06/10] python3: support profile optimized build Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 07/10] python3: fix profile-optimized build of modules Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 08/10] python-pgo-image: exclude tests from the python3 profile target Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 09/10] python3: add python3-tools subpackage Markus Lehtonen
2017-01-27 10:13 ` [PATCH RFC 10/10] python-pgo-image: change python3 profile target to pybench Markus Lehtonen
2017-01-27 10:23 ` ✗ patchtest: failure for python3: support profile-optimized build Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170127101331.14389-1-markus.lehtonen@linux.intel.com \
--to=markus.lehtonen@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox