From patchwork Thu Sep 6 11:15:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 146079 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp372467ljw; Thu, 6 Sep 2018 04:15:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZjW8YlGpjJtzjKP3Y97rjSnMwZGQuvIaiTlvPECBXO5vrq2qcMyrOFWiOvlLqld33w8eIX X-Received: by 2002:a17:902:714f:: with SMTP id u15-v6mr2195974plm.154.1536232559743; Thu, 06 Sep 2018 04:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536232559; cv=none; d=google.com; s=arc-20160816; b=Vxt4Tv2A5br/1YE1WpNP8gB28awej1e4ddmbcewgQoo4JvxgF4HxhW5MkWqdLoc2bZ 63RTzHp/NzuIWBQWCCxGcWMAq9MITENbpZTDfCAkxZci08Xmu3RLVWwI95nwAizqNk/U m5Tlpm/OUaz12qm0PFop0FTK888CpJevxrsddonEyy2EGnQosb/fit/G5DobUDLA+4jJ 6O0ebDWQyE73ONsrj0Gf4f/vcxkMx46zYO2BETwb70OEvMtqKF/rhXemJRr3vMkVjy9X 7K+LcOPNc0WhmJ9i/ifRjFJfhgH1ccHhWT94kHVc6b6Y/oQJqNiTdsBl/tdWI+c85sBe 5Kzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=RxAsQPyb3/7mAVL3AtCIIvUL0JePRf5iRgE6HRm15vQ=; b=k4IqYqPncABA07ClZUy9dd9C0h4GqmYnb7h1ZL35kOpNydstCeuy+GXfJ5r7LxSOhb Ra1cshMGCcfc20hxQ0HdqtiozdsGoYawTyTBb0lPuuhGCWQeGlUDwPSeTk2JkFRmnbYb L5mDvripbRQ3jzHhJHBI2B6yYf9DJ/THy4frYC7v4kw3C7Zhi3AK+QwkIlGXq5M85ele ll5Xv50UaOdJma/SQ7An87QUGYat86aj9YddaB5nXP9fK/ve+ZAO0+j+cbYXrzime+Zk JEYfMp+Hu3fCgjLSnuMDHrnKYlHf/KnVgkzCP/eH52y1laqvpPTeDxXSb+VJL1KGCWkw rOcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="A/6wUSNL"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id j23-v6si4928827pgn.139.2018.09.06.04.15.59; Thu, 06 Sep 2018 04:15:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="A/6wUSNL"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id BA2EF79672; Thu, 6 Sep 2018 11:15:41 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mail.openembedded.org (Postfix) with ESMTP id D18A079659 for ; Thu, 6 Sep 2018 11:15:29 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id u12-v6so10933649wrr.4 for ; Thu, 06 Sep 2018 04:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CxweMLBiCDip5UQcvDozxBNYouu4gPlvzbBZcVFDaK4=; b=A/6wUSNLi2JnHSQm+5zakwFiK7gPN4fksLthMMgkpwte79wHH+Oxu6MGIi2xv9Su2q NzcElKoRXyQxs+Xpq+JCHkMRtWhA19pMaInJY728Y3HJbHN3W6OfxL2WFnJJ3UntPsi0 4u4j3A/r1J3tADUNUVpfAfENhe8sZlz6C4YCtGNXFgLd8YVnbLm+O24fKroPg9EeGcLq il8x6ASNB1EqU4guRFDljveAQmc4NwaG6S6pulAhNs/bercKWIi38Hh4McQeb+orwzYC RNzEdiVHKfp0HpRKOuN+R+jrcqmrmRPo7pvjv5GRbYRDEpYVUXzhB3UuIdRHDnIQXfV+ 9NsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CxweMLBiCDip5UQcvDozxBNYouu4gPlvzbBZcVFDaK4=; b=b61kSezxWuI/Wp4ZFMDOKf0DZiqWjszbR20fdjVfdoX9PLltob5fN4xEi9h4fZQG6A hLwN8CRpAU9pDJ5bFgv4/N0zlNMg7vXernaAsdBd9DoDQfoMSjfnkAwMQgudx8NOfV4Q M4XbDtK0zT8Sh/MnAumhAYQ3JF0c0wANiGUrNdlKXjx3bKk3SKdqY1KssKsyETn3GSvl j8S6vuqRdr12Bpn5488+vVpmqc+Y2vVYJdvKJvoqrpzEbADMKDuGYeOg3/KhiyOdOmwr f2NgYagBuv/Yune/ME6eApIBrSmrRFJB1cIpxhaHREvB15JHu/keVZJJsOBYAcdQ2iA8 Z5CQ== X-Gm-Message-State: APzg51AuQ/+Vc7rg9GEP50jSLrkHClSXr9+KPkKrbX+CFbuhBpy6NeFK FSXCAM7u8xvyTNJNMbbFR/i+2ZWnR+w= X-Received: by 2002:a5d:6604:: with SMTP id n4-v6mr1897563wru.281.1536232530314; Thu, 06 Sep 2018 04:15:30 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id f6-v6sm5519173wrr.68.2018.09.06.04.15.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Sep 2018 04:15:29 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 6 Sep 2018 12:15:21 +0100 Message-Id: <20180906111521.20997-5-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180906111521.20997-1-ross.burton@intel.com> References: <20180906111521.20997-1-ross.burton@intel.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 5/5] python3: use regrtest instead of PyBench for profile-guided-optimisation X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org PyBench takes a long time to run, also upstream have removed it from Python and instead use test.regrtest —pgo to profile the interpreter. The results are good: not only does Python compile faster (~300s vs ~600s on my machine) but Phoronix’s PyBench test runs in 2130ms compared to 2229ms when using PyBench to train (and 2345ms with PGO disabled). Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3_3.5.5.bb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meta/recipes-devtools/python/python3_3.5.5.bb b/meta/recipes-devtools/python/python3_3.5.5.bb index b89e3b04c86..386b46a763d 100644 --- a/meta/recipes-devtools/python/python3_3.5.5.bb +++ b/meta/recipes-devtools/python/python3_3.5.5.bb @@ -76,7 +76,7 @@ SDK_CC_ARCH += "-DNDEBUG -fno-inline" EXTRA_OEMAKE += "CROSS_COMPILE=yes" EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip" -PYTHON3_PROFILE_TASK ?= "${S}/Tools/pybench/pybench.py -n 1" +PYTHON3_PROFILE_TASK ?= "./python -m test.regrtest --pgo test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_support || true" export CROSS_COMPILE = "${TARGET_PREFIX}" export _PYTHON_PROJECT_BASE = "${B}" @@ -144,13 +144,15 @@ do_compile() { if ${@bb.utils.contains('PACKAGECONFIG', 'pgo', 'true', 'false', d)}; then run_make profile-opt qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}" - cat > pgo-image-qemuwrapper << EOF + cat >pgo-wrapper <