jingfei195887 commented on issue #20414:
URL: https://github.com/apache/nuttx/issues/20414#issuecomment-6852967893

   A follow-up to my comment above, @casaroli. The STM32F103 table showed only 
one small board, so I went through MemBrowse's per-target reports on master as 
well (2026-06-18 to 2026-11-13). I credited the growth of a source file to a PR 
only when that PR was the only one changing the file between two MemBrowse 
builds. The numbers are MemBrowse code-size deltas for its own configurations, 
not my builds, so they differ from the STM32F103 table above.
   
   One thing stood out, and I'd rather mention it openly: in this period your 
PRs are the largest source of the growth I could attribute, first on every 
board with per-file data:
   
   | board | growth from your PRs (B) | share of the attributed growth |
   |---|---:|---:|
   | s698pm-dkit | +9,136 | 57% |
   | qemu-armv8a | +4,792 | 55% |
   | qemu-intel64 | +4,461 | 58% |
   | rx65n-rsk2mb | +2,095 | 56% |
   | esp32-devkitc | +2,033 | 57% |
   | mirtoo | +1,840 | 47% |
   | hifive1-revb | +1,440 | 52% |
   | stm32-nucleo-f103rb | +784 | 41% |
   
   This is not a criticism. You have been the most active contributor in these 
areas in this period: 53 of your merged PRs show up in the data, against 13 for 
the next author. Most of them close real bugs, so a large share of the growth 
comes with that work. I mention it because the growth sits in a few areas 
(signals, stdio, syslog, VFS), which makes it easier to keep in check.
   
   These are the PRs with the largest growth on a single board, sorted from 
largest to smallest. Boards not listed showed no change in the files involved:
   
   | PR | code growth per board (B), largest first |
   |---|---|
   | #21215 mm/tlsf, elf: alignment 0, invalid ELF sections | s698pm-dkit 
**+880** |
   | #21128 syslog: `openlog()` / `closelog()` | s698pm-dkit **+860**, mirtoo 
+460, qemu-intel64 +446, qemu-armv8a +344, rx65n-rsk2mb +274, esp32-devkitc 
+270, hifive1-revb +260, stm32-nucleo-f103rb +240 |
   | #21152 timer: one signal of a POSIX timer at a time | s698pm-dkit 
**+852**, qemu-armv8a +540, qemu-intel64 +413, rx65n-rsk2mb +193, hifive1-revb 
+62, esp32-devkitc +58 |
   | #21474 stream: crashes and overflows of `printf()` | qemu-intel64 
**+650**, s698pm-dkit +560, qemu-armv8a +480, rx65n-rsk2mb +179, hifive1-revb 
+168, esp32-devkitc +155, mirtoo +148, stm32-nucleo-f103rb +26 |
   | #21097 fnmatch: sets, `FNM_CASEFOLD`, `FNM_LEADING_DIR` | s698pm-dkit 
**+552**, qemu-intel64 +306, qemu-armv8a +180, esp32-devkitc +165, hifive1-revb 
+160 |
   | #21216 signal: pending signals of each thread apart | s698pm-dkit 
**+528**, qemu-armv8a +316, mirtoo +284, qemu-intel64 +277, rx65n-rsk2mb +171, 
hifive1-revb +164, esp32-devkitc +164, stm32-nucleo-f103rb +120 |
   | #21143 vfs: `lseek()` of a pipe, `open()` of a directory | s698pm-dkit 
**+492**, qemu-intel64 +183, qemu-armv8a +160, esp32-devkitc +138, rx65n-rsk2mb 
+124, hifive1-revb +112, stm32-nucleo-f103rb +82, mirtoo +28 |
   | #20796 poll: POSIX layout of `struct pollfd` | s698pm-dkit **+476**, 
qemu-armv8a +160, rx65n-rsk2mb +95, qemu-intel64 +92 |
   | #21682 fs: `st_ino` / `d_ino` / `st_dev` | s698pm-dkit **+464**, 
qemu-armv8a +276, qemu-intel64 +233, esp32-devkitc +178, rx65n-rsk2mb +90, 
hifive1-revb +86 |
   | #21095 task: `fork()` child gets the signal actions | s698pm-dkit 
**+408**, qemu-armv8a +340, qemu-intel64 +259, rx65n-rsk2mb +135, esp32-devkitc 
+12 |
   | #21674 unistd: every POSIX name in `sysconf()` | s698pm-dkit **+380**, 
qemu-armv8a +204, qemu-intel64 +145, rx65n-rsk2mb +110, esp32-devkitc +91, 
hifive1-revb +64 |
   | #20957 sched, binfmt: `E2BIG` for large arguments | qemu-intel64 **+317**, 
qemu-armv8a +236, s698pm-dkit +224, mirtoo +76, rx65n-rsk2mb +70, 
stm32-nucleo-f103rb +68, esp32-devkitc +55 |
   | #20720 signal: restore the mask of `pselect()` | s698pm-dkit **+312**, 
qemu-armv8a +200, qemu-intel64 +132, rx65n-rsk2mb +84, hifive1-revb +78, 
esp32-devkitc +77 |
   | #21795 serial: `TIOCGWINSZ` / `TIOCSWINSZ` | s698pm-dkit **+300**, mirtoo 
+160, esp32-devkitc +92, qemu-armv8a +84, qemu-intel64 +77, rx65n-rsk2mb +69, 
stm32-nucleo-f103rb +46, hifive1-revb +20 |
   | #21615 semaphore: three errors in the wait | s698pm-dkit **+292**, 
qemu-intel64 +57, mirtoo +40, qemu-armv8a +36, rx65n-rsk2mb +9, esp32-devkitc 
+8, stm32-nucleo-f103rb +6 |
   | #21352 sched: reap children when `SIGCHLD` is ignored | qemu-armv8a 
**+260**, qemu-intel64 +74 |
   | #21468 vfs: fill stat buffers locally, `FIONBIO` | s698pm-dkit **+224**, 
qemu-intel64 +210, qemu-armv8a +188, esp32-devkitc +154, mirtoo +148, 
rx65n-rsk2mb +104, stm32-nucleo-f103rb +70, hifive1-revb +56 |
   
   Two things that might help, if you agree:
   
   1. Put the parts that minimal systems rarely use behind a Kconfig defaulting 
to `!DEFAULT_SMALL`: `openlog()`/`closelog()`, the extra `fnmatch()` flags, 
`TIOCGWINSZ`, and the full `sysconf()` table.
   2. For upcoming PRs, check the MemBrowse comment on the PR and mention the 
growth in the description when it is more than a few hundred bytes, so 
reviewers can weigh it.
   
   I'm happy to send patches for the first point, or to help with measurements. 
Let me know what you think.
   
   cc @xiaoxiang781216 @acassis
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to