Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Cc: Joe Slater <jslater@windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] package.bbclass: decouple splitting	and stripping
Date: Tue, 17 Mar 2015 21:20:08 +0000	[thread overview]
Message-ID: <1426627208.23698.39.camel@linuxfoundation.org> (raw)
In-Reply-To: <4010D2ED-6067-4B6B-9C27-B2C5FC465DC9@gmail.com>

On Fri, 2015-03-13 at 23:50 +0100, Bernhard Reutner-Fischer wrote:
> On March 13, 2015 10:57:53 PM GMT+01:00, Joe Slater <jslater@windriver.com> wrote:
> >Fix logic in split_and_strip_files() to allow splitting or
> >stripping independently.  We also return quickly from this
> >function if we have nothing to do.  We seek the following behavior:
> >
> >Strip / Split     Behavior
> >yes   / yes       binaries stripped; debug info and source in -dbg
> >no    / yes       debug info and source in -dbg
> >yes   / no        binaries stripped; -dbg packages empty
> >no    / no        -dbg packages empty (not a very useful case)
> >
> >Currently, no/yes does not work and is the same as no/no.
> >
> >Signed-off-by: Joe Slater <jslater@windriver.com>
> >---
> >meta/classes/package.bbclass |  108
> >++++++++++++++++++++++--------------------
> > 1 file changed, 57 insertions(+), 51 deletions(-)
> >
> >diff --git a/meta/classes/package.bbclass
> >b/meta/classes/package.bbclass
> >index 9f64ed7..ad8771f 100644
> >--- a/meta/classes/package.bbclass
> >+++ b/meta/classes/package.bbclass
> >@@ -812,6 +812,12 @@ python fixup_perms () {
> > }
> > 
> > python split_and_strip_files () {
> 
> >+    for root, dirs, files in cpath.walk(dvar):
> >+        for f in files:
> >+            file = os.path.join(root, f)
> >+            if file.endswith(".ko") and file.find("/lib/modules/") !=
> >-1:
> >+                kernmods.append(file)
> >+                continue
> >  
> >+            # Skip debug files
> >+            if debugappend and file.endswith(debugappend):
> >+                continue
> >+            if debugdir and debugdir in
> >os.path.dirname(file[len(dvar):]):
> >+                continue
> >+
> 
> It's a pity to first construct the files just to throw them away right afterwards.
> Maybe there are other cpath.walk spots that would benefit from file_not_endswith and dir filters?

FWIW cpath is actually a caching wrapper around os.path so there is some
amount of caching going on here behind the scenes. The current code has
been profiled and the worst hot spots worked around with the cache...

Its not perfect and I don't doubt more could be done but these pieces do
seem to help a lot. The best thing we did is avoid a lot of syscall
overhead.

Cheers,

Richard



  reply	other threads:[~2015-03-17 21:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 21:57 [PATCH 1/1] package.bbclass: decouple splitting and stripping Joe Slater
2015-03-13 22:50 ` Bernhard Reutner-Fischer
2015-03-17 21:20   ` Richard Purdie [this message]
2015-03-18 17:44     ` Slater, Joseph
2015-03-30 21:08       ` [PATCH] gcc-cross-canadian: Add inhibit of split as well was " Mark Hatle
2015-03-30 21:45         ` Richard Purdie
2015-03-30 21:53           ` Mark Hatle

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=1426627208.23698.39.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=jslater@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=rep.dot.nop@gmail.com \
    /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