This is a cool tool.

https://github.com/google/bloaty

Here is a set of ways to use it.
https://github.com/PX4/Firmware/blob/4e7dedede79872401f50c733bd74e5ddf1fa41f1/cmake/bloaty.cmake
(please ignore the cmake...)

This is the one that can be used to see the deltas, in our case from mater
to the PR. But it is easy to compare to a release branch.

# bloaty compare with last master build
        add_custom_target(bloaty_compare_master
                COMMAND wget -c -N --no-verbose
https://s3.amazonaws.com/px4-travis/Firmware/master/${PX4_BOARD_VENDOR}_${PX4_BOARD_MODEL}_${PX4_BOARD_LABEL}.elf
-
O master.elf
                COMMAND ${BLOATY_PROGRAM} -d symbols ${BLOATY_OPTS} 
$<TARGET_FILE:px4> --
master.elf
                DEPENDS px4
                WORKING_DIRECTORY ${PX4_BINARY_DIR}
                VERBATIM
                USES_TERMINAL
                )


-----Original Message-----
From: Brennan Ashton [mailto:bash...@brennanashton.com]
Sent: Tuesday, June 23, 2020 10:53 PM
To: dev@nuttx.apache.org
Subject: Re: [VOTE] Apache NuttX 9.1.0 (incubating) RC0 release

Greg and Alan,
Started looking and there are some changes in the diff in the
generated config.h as can be seen here
One change is the date command is no longer disabled by default.  This
accounts for 2304 bytes, leaving only 800 byte change.
I'm not sure if changing the default was expected, but I dont think
this should block the release.
The TLS changes are harder for me to judge and the netdb change I
think just changes ram usage.  I can dig more, if you think it is
necessary, I agree that we should keep and eye on the size though. I
had some thoughts on keeping the build artifacts around so we could
track and test things easier (hard to go back in time with both repos
changing).

9.1.0
   text       data        bss        dec        hex    filename
  71731        104       2476      74311      12247    ./9.1/nuttx

9.1.0 (with date disabled)
   text       data        bss        dec        hex    filename
  69427        104       2476      72007      11947    nuttx


--- /home/bashton/nuttx/apache/sizetest/9.0/config.h
+++ /home/bashton/nuttx/apache/sizetest/9.1/config.h
@@ -135,7 +135,6 @@
 #define CONFIG_TASK_NAME_SIZE 31
 #define CONFIG_MAX_TASKS 16
 #define CONFIG_SCHED_WAITPID 1
-#define CONFIG_NPTHREAD_KEYS 4
 #define CONFIG_PTHREAD_MUTEX_ROBUST 1
 #define CONFIG_DEV_CONSOLE 1
 #define CONFIG_SDCLONE_DISABLE 1
@@ -196,15 +195,14 @@
 #define CONFIG_POSIX_SPAWN_PROXY_STACKSIZE 1024
 #define CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE 2048
 #define CONFIG_LIB_HOSTNAME ""
-#define CONFIG_ARCH_HAVE_TLS 1
-#define CONFIG_NETDB_BUFSIZE 128
+#define CONFIG_TLS_NELEM 4
+#define CONFIG_NETDB_BUFSIZE 256
 #define CONFIG_NETDB_MAX_IPADDR 1
-#define CONFIG_LIBC_IOCTL_VARIADIC 1
 #define CONFIG_LIB_SENDFILE_BUFSIZE 512
 #define CONFIG_BUILTIN 1
 #define CONFIG_HAVE_CXX 1
 #define CONFIG_EXAMPLES_HELLO 1
-#define CONFIG_EXAMPLES_HELLO_PROGNAME hello
+#define CONFIG_EXAMPLES_HELLO_PROGNAME "hello"
 #define CONFIG_EXAMPLES_HELLO_PRIORITY 100
 #define CONFIG_EXAMPLES_HELLO_STACKSIZE 2048
 #define CONFIG_NSH_LIBRARY 1
@@ -214,7 +212,6 @@
 #define CONFIG_NSH_MAXARGUMENTS 7
 #define CONFIG_NSH_NESTDEPTH 3
 #define CONFIG_NSH_BUILTIN_APPS 1
-#define CONFIG_NSH_DISABLE_DATE 1
 #define CONFIG_NSH_DISABLE_LOSMART 1
 #define CONFIG_NSH_DISABLE_PRINTF 1
 #define CONFIG_NSH_DISABLE_TRUNCATE 1
@@ -227,7 +224,7 @@
 #define CONFIG_SYSTEM_NSH 1
 #define CONFIG_SYSTEM_NSH_PRIORITY 100
 #define CONFIG_SYSTEM_NSH_STACKSIZE 2048
-#define CONFIG_SYSTEM_NSH_PROGNAME nsh
+#define CONFIG_SYSTEM_NSH_PROGNAME "nsh"
 #define CONFIG_SYSTEM_NSH_CXXINITIALIZE 1
 #define CONFIG_READLINE_HAVE_EXTMATCH 1
 #define CONFIG_SYSTEM_READLINE 1

On Tue, Jun 23, 2020 at 6:17 PM Gregory Nutt <spudan...@gmail.com> wrote:
>
> On 6/23/2020 6:59 PM, Gregory Nutt wrote:
> >
> >> I compared it to release 9.0 and noticed it increased about 3 KiB of
> >> Flash usage, but I didn't check further to see what happened.
> >>
> >> NuttX 9.0
> >>
> >> $ arm-none-eabi-size nuttx
> >>     text       data        bss        dec        hex    filename
> >>    68624        104       2496      71224      11638    nuttx
> >>
> >>
> >> NuttShell (NSH) NuttX-9.0.0
> >> nsh> free
> >>               total       used       free    largest
> >> Umem:       192976       7536     185440     125248
> >> nsh>
> >>
> >>
> >> NuttX 9.1 RC0
> >>
> >> $ arm-none-eabi-size nuttx
> >>     text       data        bss        dec        hex    filename
> >>    71732        104       2476      74312      12248    nuttx
> >>
> >>
> >> NuttShell (NSH) NuttX-9.1.0
> >> nsh> free
> >>               total       used       free    largest
> >> Umem:       192992       7536     185456     125264
> >> nsh>
> >
> > This might indicate a significant problem.  One possible explanation
> > might be that a new configuration option enables logic by default that
> > it should not.  Almost any explanation you can think of suggests a
> > problem.
>
> Can you look into this Alan?  I would think that an unexplained 3Kb size
> increase in such a trivial configuration would warrant a -1 vote.
>
>

Reply via email to