All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 2015.08 2/4] support/scripts: add size-stats script
Date: Wed, 2 Sep 2015 23:08:49 +0200	[thread overview]
Message-ID: <20150902230849.7f8d05fd@free-electrons.com> (raw)
In-Reply-To: <CALq67GB6scfWxE4F4NZfVFzZHQZ2QAaL9GoE_KsBnmhXvaU0Dg@mail.gmail.com>

Ryan,

(Yes, I'm replying to a very old e-mail)

On Wed, 27 May 2015 22:18:32 -0500, Ryan Barnett wrote:

> > +def build_package_size(filesdict, builddir):
> > +    pkgsize = collections.defaultdict(int)
> > +
> > +    for root, _, files in os.walk(os.path.join(builddir, "target")):
> > +        for f in files:
> > +            fpath = os.path.join(root, f)
> > +            if os.path.islink(fpath):
> > +                continue
> > +            frelpath = os.path.relpath(fpath, os.path.join(builddir, "target"))
> > +            if not frelpath in filesdict:
> > +                print("WARNING: %s is not part of any package" % frelpath)
> 
> Would it be useful to have an exclusion list since this will always be
> printed out?
> 
> Every time you run 'make clean all size-stats' you will be faced with
> warnings such as this:
> 
> WARNING: THIS_IS_NOT_YOUR_ROOT_FILESYSTEM is not part of any package
> WARNING: etc/ld.so.cache is not part of any package
> WARNING: etc/hostname is not part of any package
> WARNING: etc/os-release is not part of any package
> WARNING: etc/nsswitch.conf is not part of any package
> WARNING: etc/ld.so.conf is not part of any package
> WARNING: etc/network/interfaces is not part of any package
> WARNING: tmp/ldconfig/aux-cache is not part of any package
> WARNING: dev/console is not part of any package
> 
> Initially when I saw this I didn't do something correct, however, I
> quickly released that these are files that are generated by
> buildroot's makefiles (such as THIS_IS_NOT_YOUR_ROOT_FILESYSTEM and
> etc/hostname). Since this files are generated by buildroot and one
> shouldn't be concerned about this files not being a part of any
> package. While typing this, would it make sense to create a package
> called 'buildroot' whose files are defined statically within this
> script?

Since I am not sure how to handle those files yet, I've left this as is
for the moment. In my tests I'm seeing less warnings now:

thomas at skate:~/projets/buildroot (size-stats-v5)$ make size-stats
WARNING: etc/os-release is not part of any package
WARNING: etc/ld.so.conf is not part of any package
WARNING: etc/hostname is not part of any package
WARNING: etc/network/interfaces is not part of any package

Which looks a bit more reasonable.


> > +    # Reduce text size
> > +    proptease = fm.FontProperties()
> > +    proptease.set_size('xx-small')
> > +    plt.setp(autotexts, fontproperties=proptease)
> > +    plt.setp(texts, fontproperties=proptease)
> 
> Could the total size of filesystem be placed on this graph? I was
> thinking maybe at the bottom of the graph in as a subtitle - don't
> know if this possible?

I've implemented this idea, thanks for the suggestion!

> Another idea would be the option to specify a chart title. This could
> be something that could be used with dependency graph as well or any
> other graph generated by buildroot (can't think of any others off at
> this moment). However, I would say that should be a future feature
> that is implemented.

For this one, I'd say we should handle it together with the other
graphs generated by Buildroot, so I've left it on the side for now.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2015-09-02 21:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-25 21:56 [Buildroot] [PATCH v4 2015.08 0/4] Generate package size statistics Thomas Petazzoni
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 1/4] pkg-generic: add step_pkg_size global instrumentation hook Thomas Petazzoni
2015-05-28  3:29   ` Ryan Barnett
2015-07-11 10:46   ` Romain Naour
2015-07-11 11:09     ` Thomas Petazzoni
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 2/4] support/scripts: add size-stats script Thomas Petazzoni
2015-05-28  3:18   ` Ryan Barnett
2015-05-28 14:55     ` Matthew Weber
2015-09-02 21:08     ` Thomas Petazzoni [this message]
2015-06-03 15:50   ` Clayton Shotwell
2015-07-11 11:46     ` Romain Naour
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 3/4] Makefile: implement a size-stats target Thomas Petazzoni
2015-05-28  3:32   ` Ryan Barnett
2015-08-20 12:42   ` Ryan Barnett
2015-08-20 20:43     ` Thomas Petazzoni
2015-08-21 14:07       ` Ryan Barnett
2015-08-23 14:46         ` Thomas Petazzoni
2015-05-25 21:56 ` [Buildroot] [PATCH v4 2015.08 4/4] docs/manual: add section about size graphing Thomas Petazzoni
2015-05-28  3:42   ` Ryan Barnett
2015-07-30 21:54 ` [Buildroot] [PATCH v4 2015.08 0/4] Generate package size statistics Ryan Barnett

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=20150902230849.7f8d05fd@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.