lwip-users
[Top][All Lists]
Advanced

[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 09:25:47 -0800

I'm thinking back on Adam's original lwIP paper and how it had some nice
tables and charts... always nice to have numbers that are easy to look
at like that. 

Even better if we could get the tool to work on a couple different
platforms (i.e. CISC and RISC) just to cover the bases.

Let me know what I can do to help you.

Jared

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
address@hidden
Sent: Monday, November 26, 2007 09:16
To: Mailing list for lwIP users
Subject: Re: [lwip-users] "automatic" code size analisys/comparison
tools

I'll see what I can do. Didn't come that far yet: cygwin 'size' doesn't 
count static data in (or was it global-non-static? I don't remember). 
Anyway, code size is quite OK but I'll have to figure it out... Once I 
have something I'll post it.

Simon

Grubb, Jared schrieb:
> 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 mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>   



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]