[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] "automatic" code size analisys/comparison tools
From: |
Grubb, Jared |
Subject: |
RE: [lwip-users] "automatic" code size analisys/comparison tools |
Date: |
Mon, 26 Nov 2007 08:57:57 -0800 |
If you do get something that produces a good-looking report of code
size, I'd love for you to forward it to me for the Wiki.
Jared
-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Erik Ekman
Sent: Friday, November 23, 2007 10:45
To: Mailing list for lwIP users
Cc: lwip-devel
Subject: Re: [lwip-users] "automatic" code size analisys/comparison
tools
On 11/23/07, address@hidden <address@hidden> wrote:
> I know this is kind of off-topic, but maybe I get some good answers
here...
>
> I try to visualize the code size of lwIP (e.g. to see if 1.3.0 made it
> better or worse). Until now, I have took a loop at the map files and
> used a calculator for small regions but that does not really work nice
> if I want to compare the whole stack + different options on PC and
ARM.
>
> What I'm looking for is a tool that can read map files (GCC/elf and
> win32/PE) and generate a report out of that, ideally including a
graphic
> representation. Since I can't be the first person trying to do this,
> there must exist some utilities for that. Only google didn't want to
> show me any...
>
> I'd be so happy if anyone could point me somewhere...
>
> Thanks,
> Simon
>
>
I had the same problem, and threw together a sed/python-script that
parses the entire code base for function definitions, and scans the
ELF disassembly for function sizes. Output is as follows: [view with
monospace font]
/lwip : 62841
/lwip/src : 62841
/lwip/src/basic_signal.c : 1074
/lwip/src/basic_signal.c#signal_connected : 173
/lwip/src/basic_signal.c#signal_err : 126
/lwip/src/basic_signal.c#signal_send : 545
/lwip/src/basic_signal.c#signal_sent : 230
/lwip/src/core : 52245
/lwip/src/core/dhcp.c : 12364
/lwip/src/core/dhcp.c#dhcp_arp_reply : 336
/lwip/src/core/dhcp.c#dhcp_bind : 848
/lwip/src/core/dhcp.c#dhcp_check : 214
/lwip/src/core/dhcp.c#dhcp_coarse_tmr : 170
/lwip/src/core/dhcp.c#dhcp_create_request : 684
/lwip/src/core/dhcp.c#dhcp_decline : 482
/lwip/src/core/dhcp.c#dhcp_delete_request : 167
/lwip/src/core/dhcp.c#dhcp_discover : 686
/lwip/src/core/dhcp.c#dhcp_fine_tmr : 136
/lwip/src/core/dhcp.c#dhcp_free_reply : 109
and so on.. Sizes are summed going up in the tree. This is an
unoptimized 386 Linux build shown here. A problem is that the
low_level_input function is found in multiple files, and all of these
add to the total sum.
The sed script doesnt find the multi-line functions in lwip, so I have
hard-coded them to get the sum right.
I could post the scripts here if you like.
/Erik
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
- [lwip-users] "automatic" code size analisys/comparison tools, address@hidden, 2007/11/23
- Re: [lwip-users] "automatic" code size analisys/comparison tools, Erik Ekman, 2007/11/23
- RE: [lwip-users] "automatic" code size analisys/comparison tools,
Grubb, Jared <=
- Re: [lwip-users] "automatic" code size analisys/comparison tools, address@hidden, 2007/11/26
- RE: [lwip-users] "automatic" code size analisys/comparison tools, Grubb, Jared, 2007/11/26
- Re: [lwip-users] "automatic" code size analisys/comparison tools, address@hidden, 2007/11/26
- RE: [lwip-users] "automatic" code size analisys/comparison tools, Grubb, Jared, 2007/11/26
- Re: [lwip-users] "automatic" code size analisys/comparison tools, Frédéric BERNON, 2007/11/26
- Re: [lwip-users] "automatic" code size analisys/comparison tools, address@hidden, 2007/11/26
- Re: [lwip-users] "automatic" code size analisys/comparison tools, Jonathan Larmour, 2007/11/26
- AW: [lwip-users] "automatic" code size analisys/comparison tools, Goldschmidt Simon, 2007/11/27
Re: [lwip-users] "automatic" code size analisys/comparison tools, Jonathan Larmour, 2007/11/23