Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] cmake-native: Set --parallel for configure
@ 2018-12-19  6:51 Robert Yang
  2018-12-19  6:51 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2018-12-19  6:51 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 14c291e1fb6324da46885b69fbd7f01b3c6b053e:

  gcc-runtime: Add missing libc dependency (2018-12-18 16:19:30 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/cmake
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/cmake

Robert Yang (1):
  cmake-native: Set --parallel for configure

 meta/recipes-devtools/cmake/cmake-native_3.12.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] cmake-native: Set --parallel for configure
  2018-12-19  6:51 [PATCH 0/1] cmake-native: Set --parallel for configure Robert Yang
@ 2018-12-19  6:51 ` Robert Yang
  2018-12-19 10:37   ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2018-12-19  6:51 UTC (permalink / raw)
  To: openembedded-core

This can save do_configure's time from 330s to 60s on my host.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/recipes-devtools/cmake/cmake-native_3.12.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
index 9a1390f..71b3326 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
@@ -27,7 +27,9 @@ CMAKE_EXTRACONF = "\
 "
 
 do_configure () {
-	${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+	${S}/configure --verbose --prefix=${prefix} \
+		--parallel=${@d.getVar('PARALLEL_MAKE').replace('-j ', '')} \
+		-- ${CMAKE_EXTRACONF}
 }
 
 do_compile() {
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cmake-native: Set --parallel for configure
  2018-12-19  6:51 ` [PATCH 1/1] " Robert Yang
@ 2018-12-19 10:37   ` Burton, Ross
  2018-12-20  6:50     ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2018-12-19 10:37 UTC (permalink / raw)
  To: Robert Yang; +Cc: OE-core

On Wed, 19 Dec 2018 at 06:34, Robert Yang <liezhi.yang@windriver.com> wrote:
> +               --parallel=${@d.getVar('PARALLEL_MAKE').replace('-j ', '')} \

See oe.utils.parallel_make_argument()

Ross


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cmake-native: Set --parallel for configure
  2018-12-19 10:37   ` Burton, Ross
@ 2018-12-20  6:50     ` Robert Yang
  2018-12-20 12:16       ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2018-12-20  6:50 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core



On 12/19/18 6:37 PM, Burton, Ross wrote:
> On Wed, 19 Dec 2018 at 06:34, Robert Yang <liezhi.yang@windriver.com> wrote:
>> +               --parallel=${@d.getVar('PARALLEL_MAKE').replace('-j ', '')} \
> 
> See oe.utils.parallel_make_argument()

Thanks, updated in the repo:

commit 19ac4e33e66353581191e7dfd866f6c0f73eafa6
Author: Robert Yang <liezhi.yang@windriver.com>
Date:   Tue Dec 18 17:48:22 2018 +0800

     cmake-native: Set --parallel for configure

     This can save do_configure's time from 330s to 60s on my host.

     Signed-off-by: Robert Yang <liezhi.yang@windriver.com>

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb 
b/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
index 9a1390f..3086c82 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.12.2.bb
@@ -27,7 +27,9 @@ CMAKE_EXTRACONF = "\
  "

  do_configure () {
-       ${S}/configure --verbose --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+       ${S}/configure --verbose --prefix=${prefix} \
+               --parallel="${@oe.utils.parallel_make_argument(d, '%d')}" \
+               -- ${CMAKE_EXTRACONF}
  }

  do_compile() {


// Robert

> 
> Ross
> 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cmake-native: Set --parallel for configure
  2018-12-20  6:50     ` Robert Yang
@ 2018-12-20 12:16       ` Burton, Ross
  2018-12-20 12:22         ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2018-12-20 12:16 UTC (permalink / raw)
  To: Robert Yang; +Cc: OE-core

On Thu, 20 Dec 2018 at 06:46, Robert Yang <liezhi.yang@windriver.com> wrote:
> +               --parallel="${@oe.utils.parallel_make_argument(d, '%d')}" \

Tweaked when merging to mut to be:

+       ${S}/configure --verbose --prefix=${prefix} \
+               ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
+               -- ${CMAKE_EXTRACONF}

I see similar wins here, walltime for cmake-native's build goes from
five minutes to one minute.

(!!!)

Ross


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] cmake-native: Set --parallel for configure
  2018-12-20 12:16       ` Burton, Ross
@ 2018-12-20 12:22         ` Burton, Ross
  0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2018-12-20 12:22 UTC (permalink / raw)
  To: Robert Yang; +Cc: OE-core

On Thu, 20 Dec 2018 at 12:16, Burton, Ross <ross.burton@intel.com> wrote:
> I see similar wins here, walltime for cmake-native's build goes from
> five minutes to one minute.

For anyone playing along at home, this is what I did:

Cleaned tmp, applied patch to the mut branch.

$ git checkout HEAD^; bitbake cmake-native -C unpack
$ git checkout mut ; bitbake cmake-native -C unpack

Force a full build of cmake-native for both commits.

Then use buildstats-diff to compare the runs:

$ buildstats-diff /data/poky-tmp/master/buildstats/*
  PKG             TASK          ABSDIFF  RELDIFF  CPUTIME1 -> CPUTIME2
  cmake-native    do_configure    29.1s   +11.0%    265.7s -> 294.8s

Cumulative cputime:
  18.0s    +2.2%    13:41.4 (821.4s) -> 13:59.3 (839.3s)

Oh, that's odd: it took *more* time to run.  But the output from my
bitbake clearly showed bitbake taking five minutes before and one
minute after.

Oh, *walltime* not *cputime*.

$ buildstats-diff /data/poky-tmp/master/buildstats/* --diff-attr walltime
  PKG             TASK          ABSDIFF  RELDIFF  WALLTIME1 -> WALLTIME2
  cmake-native    do_configure  -214.6s   -82.4%     260.4s -> 45.8s

Cumulative walltime:
  -218.4s    -72.3%    05:02.1 (302.1s) -> 01:23.7 (83.7s)

cputime is generally a more useful metric during a build, but for
isolated tests like this walltime is also relevant. This is
demonstrating that the same work is happening, but in parallel.

Ross


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-20 12:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-19  6:51 [PATCH 0/1] cmake-native: Set --parallel for configure Robert Yang
2018-12-19  6:51 ` [PATCH 1/1] " Robert Yang
2018-12-19 10:37   ` Burton, Ross
2018-12-20  6:50     ` Robert Yang
2018-12-20 12:16       ` Burton, Ross
2018-12-20 12:22         ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox