From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv2 4/4] Makefile: implement a size-stats target
Date: Wed, 14 Jan 2015 00:06:15 +0100 [thread overview]
Message-ID: <54B5A4E7.9030708@openwide.fr> (raw)
In-Reply-To: <20150113091247.56a66605@free-electrons.com>
Hi Thomas,
Le 13/01/2015 09:12, Thomas Petazzoni a ?crit :
> Dear Romain Naour,
>
> On Mon, 12 Jan 2015 23:47:28 +0100, Romain Naour wrote:
>
>>> +size-stats:
>>> + @[ -f $(O)/build/packages-file-list.txt ] || \
>>> + { echo "ERROR: No package size information available, please rebuild with BR2_COLLECT_FILE_SIZE_STATS" ; exit 1; }
>>> + @$(INSTALL) -d $(O)/graphs
>>> + @cd "$(CONFIG_DIR)"; \
>>> + $(TOPDIR)/support/scripts/graph-size --builddir $(O) \
>>
>> graph-size -> size-stats ?
>
> Will fix, thanks for noticing (I renamed the script late in my
> development).
>
>> But with that fixed I get:
>> $ make O=test/xfsprogs/ size-stats
>> Traceback (most recent call last):
>> File "/home/naourr/git/buildroot/support/scripts/size-stats", line 217, in <module>
>> pkgdict = build_package_dict(args.builddir)
>> File "/home/naourr/git/buildroot/support/scripts/size-stats", line 68, in build_package_dict
>> with open(os.path.join(builddir, "build", "packages-file-list.txt")) as filelistf:
>> IOError: [Errno 2] No such file or directory: 'test/xfsprogs/build/packages-file-list.txt'
>>
>> But this file exist:
>> $ ls test/xfsprogs/build/packages-file-list.txt
>> test/xfsprogs/build/packages-file-list.txt
>
> Might be that I didn't properly take into account out-of-tree build. My
> bad, I'll have a look.
The problem is that the size-stats script is called from CONFIG_DIR
I removed this line "@cd "$(CONFIG_DIR)"; \" and I get this graph (see attached
file).
>
>> Also I noticed that the man pages (and headers)
>> are taken into account in packages-file-list.txt:
>> [...]
>> tmux,./usr/bin/tmux
>> tmux,./usr/share/man/man1/tmux.1
>>
>> Since they are removed at the end, I think we want to
>> remove them from packages-file-list.txt during
>> TARGET_DIR cleanup ?
>
> It does not really matter if there are more files in
> packages-file-list.txt that there really are in TARGET_DIR, because the
> logic of the size-stats script is to travel through TARGET_DIR, and for
> each file in TARGET_DIR, lookup in packages-file-list.txt which package
> was the last one to install this file. So all files that are in
> packages-file-list.txt but not in TARGET_DIR are purely and simply
> ignored.
Ok, I haven't reviewed the size-stats script yet.
Thank for the explanation.
Best regards,
Romain
>
> Thanks for your review and testing!
>
> Thomas
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graph-size.pdf
Type: application/pdf
Size: 18491 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150114/e0d04737/attachment.pdf>
prev parent reply other threads:[~2015-01-13 23:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 21:41 [Buildroot] [PATCHv2 0/4] Generate package size statistics Thomas Petazzoni
2014-12-01 21:41 ` [Buildroot] [PATCHv2 1/4] toolchain-external: split target installation from staging installation Thomas Petazzoni
2014-12-02 11:00 ` Jérôme Pouiller
2015-01-10 17:02 ` Thomas Petazzoni
2014-12-01 21:41 ` [Buildroot] [PATCHv2 2/4] pkg-generic: add step_pkg_size global instrumentation hook Thomas Petazzoni
2014-12-02 11:00 ` Jérôme Pouiller
2014-12-02 12:23 ` Thomas Petazzoni
2014-12-02 13:22 ` Jérôme Pouiller
2014-12-02 13:40 ` Jérôme Pouiller
2014-12-01 21:41 ` [Buildroot] [PATCHv2 3/4] support/scripts: add size-stats script Thomas Petazzoni
2014-12-02 11:01 ` Jérôme Pouiller
2014-12-02 12:28 ` Thomas Petazzoni
2014-12-02 13:24 ` Jérôme Pouiller
2014-12-01 21:41 ` [Buildroot] [PATCHv2 4/4] Makefile: implement a size-stats target Thomas Petazzoni
2015-01-12 22:47 ` Romain Naour
2015-01-13 8:12 ` Thomas Petazzoni
2015-01-13 23:06 ` Romain Naour [this message]
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=54B5A4E7.9030708@openwide.fr \
--to=romain.naour@openwide.fr \
--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.