Skip to contentSkip to conversation

support/scripts/size-stats: increase number of files that can be linked to a source

PATCH New Daniel Crowe 3 participants 4 messages Feb 10, 2021 – Feb 16, 2021 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/scripts/size-stats: increase number of files that can be linked to a source

---
 Makefile                   |  1 +
 support/scripts/size-stats | 76 +++++++++++++++++++++++++++-----------
 2 files changed, 56 insertions(+), 21 deletions(-)
Makefile +1 -0
index 14e10223ed..495b5df1ac 100644
@@ -912,6 +912,7 @@ graph-depends: graph-depends-requirements
 graph-size:
 	$(Q)mkdir -p $(GRAPHS_DIR)
 	$(Q)$(TOPDIR)/support/scripts/size-stats --builddir $(BASE_DIR) \
+		--overlay $(BR2_ROOTFS_OVERLAY) \
 		--graph $(GRAPHS_DIR)/graph-size.$(BR_GRAPH_OUT) \
 		--file-size-csv $(GRAPHS_DIR)/file-size-stats.csv \
 		--package-size-csv $(GRAPHS_DIR)/package-size-stats.csv \
support/scripts/size-stats +55 -21

119 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 support/scripts/size-stats: increase number of files that can be linked to a source

Hi Daniel,

El mi?, 10 feb 2021 a las 12:13, Daniel Crowe
(<[email protected]>) escribi?:

Quoted 7 lines
---
 Makefile                   |  1 +
 support/scripts/size-stats | 76 +++++++++++++++++++++++++++-----------
 2 files changed, 56 insertions(+), 21 deletions(-)

Please extend your commit message with more information: what is the problem you're fixing, and how are you fixing it.
Right now, we can only guess what it is doing based on the code.

It looks like the change is extending the size information to rootfs-overlays, while today only real packages are considered. But if that is correct, then the title "increase number of files that can be linked to a source" is confusing to me.

Thanks,
Thomas

#2 lore raw

PATCH 1/1 support/scripts/size-stats: increase number of files that can be linked to a source

Quoted 8 lines · On Tue, 16 Feb 2021 15:06:39 +0100 Thomas De Schampheleire…

Please extend your commit message with more information: what is the problem you're fixing, and how are you fixing it.
Right now, we can only guess what it is doing based on the code.

It looks like the change is extending the size information to rootfs-overlays, while today only real packages are considered. But if that is correct, then the title "increase number of files that can be linked to a source" is confusing to me.

The change is not just about the rootfs overlay, but also about taking into account .pyc files compiled from .py files:

+ # account for python file compilation
+ if fpath.endswith('.py'):
+ add_file(filesdict, fpath + 'c', fullpath + 'c', pkg)

This should at least be separated in another patch. I'm not a huge fan of this approach, but I don't really have a good suggestion. Ideally, we should byte-compile each package independently, so that it's part of the install step of the package. But that would be vastly less efficient than just byte-compiling everything in one go at the end of the build, like we're doing.

Daniel: could you rework your patch a bit, splitting it into several patches, with a slightly improved commit log ? I think it makes a lot of sense to have these improvements to size-stats.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 support/scripts/size-stats: increase number of files that can be linked to a source

Thanks for the feedback. Happy to rework it as suggested.

Quoted 38 lines · Thomas Petazzoni
Quoted 8 lines · On Tue, 16 Feb 2021 15:06:39 +0100 Thomas De Schampheleire…

Please extend your commit message with more information: what is the problem you're fixing, and how are you fixing it.
Right now, we can only guess what it is doing based on the code.

It looks like the change is extending the size information to rootfs-overlays, while today only real packages are considered. But if that is correct, then the title "increase number of files that can be linked to a source" is confusing to me.

The change is not just about the rootfs overlay, but also about taking into account .pyc files compiled from .py files:

support/scripts/size-stats +3 -0
+            # account for python file compilation
+            if fpath.endswith('.py'):
+                add_file(filesdict, fpath + 'c', fullpath + 'c', pkg)

This should at least be separated in another patch. I'm not a huge fan of this approach, but I don't really have a good suggestion. Ideally, we should byte-compile each package independently, so that it's part of the install step of the package. But that would be vastly less efficient than just byte-compiling everything in one go at the end of the build, like we're doing.

Daniel: could you rework your patch a bit, splitting it into several patches, with a slightly improved commit log ? I think it makes a lot of sense to have these improvements to size-stats.

Thanks a lot!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Signature · 10 lines
*Daniel Crowe | Senior Embedded Developer*

Resolution Systems Pty Ltd | L1 214 Greenhill Road, Eastwood South
Australia, 5063, Australia
m. +61 400 014 688
e. daniel.crowe at resolution.systems | www.resolution.systems
[image: Resolution Systems]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210217/80cfd2ed/attachment.html>