Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2001 08:52:32 +0800
From:      Rex Luo <rexluo@synology.com>
To:        Julian Elischer <julian@elischer.org>, current@FreeBSD.ORG
Subject:   Re: Kernel stack hogs list available
Message-ID:  <200108160052.IAA15039@synology.com>

next in thread | raw e-mail | index | archive | help

  May I ask where to get this utility?
Thanks!

Julian Elischer <julian@elischer.org> said: 
> I ported the code to allow gcc to report functions that use too much
> of our 3.4KB kernel stacks.
> 
> I tried it ou ton a compile of GENERIC.
> it produced some 360 functions that allocate over 100 bytes on the stack.
> 
> The list is available at:
> http://people.freebsd.org/~julian/stack-hogs
> 
> It's quite interesting reading.
>  I set the limit size to 100 bytes per frame
> as that seems a reasonable size to do must things. (remember the 
> catch-phrase in teh kernel is "no big structures on the stack")
> 
> Consider that many functions call each other, and some can even be
> recursive, I find it easy to believe that some of teh off crashes I've
> seen over the years may have come from teh 3.5KB being exhusted and the
> stack wandering into the u-area where results would be 'dodgy'
> at best.
> 
> Please take a look and see if any of your pet projects is listed here..
> 
> for a quick example here are teh files where over 1K is being allocated on
> the stack!
> 
> dev/ata/atapi-cd.c:1804: 2068 byte frame 
> dev/ata/ata-raid.c:524:  2056 byte frame 
> dev/ata/atapi-cd.c:1055: 1756 byte frame 
> net/if_sl.c:778:         1540 byte frame 
> dev/usb/ugen.c:694:      1168 byte frame 
> dev/an/if_an.c:1572:     1112 byte frame 
> dev/wi/if_wi.c:1647:     1096 byte frame 
> dev/usb/usb_subr.c:897:  1088 byte frame 
> kern/imgact_elf.c:668:   1072 byte frame 
> dev/usb/ums.c:358:       1056 byte frame 
> dev/usb/ukbd.c:182:      1048 byte frame 
> dev/awi/awi_wicfg.c:328: 1044 byte frame 
> netinet6/nd6.c:2225:     1040 byte frame 
> dev/usb/uhid.c:252:      1040 byte frame 
> dev/awi/awi_wicfg.c:626: 1040 byte frame 
> dev/usb/uscanner.c:322:  1036 byte frame 
> dev/usb/urio.c:439:      1036 byte frame 
> dev/usb/ulpt.c:333:      1036 byte frame 
> dev/usb/if_cue.c:554:    1036 byte frame 
> dev/usb/if_aue.c:752:    1036 byte frame 
> dev/usb/urio.c:508:      1032 byte frame 
> dev/usb/urio.c:290:      1032 byte frame 
> dev/usb/ugen.c:767:      1032 byte frame 
> dev/wi/if_wi.c:2345:     1028 byte frame 
> dev/wi/if_wi.c:2258:     1028 byte frame 
> dev/usb/umass.c:968:     1028 byte frame 
> dev/usb/ugen.c:228:      1028 byte frame 
> dev/usb/if_kue.c:511:    1028 byte frame 
> netinet6/nd6.c:2151:     1024 byte frame 
> 
> Remember these are only in GENERIC.
> 
> Julian
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
> 



--
Rex Luo

Tel : 886-2-25521814 Ext. 824
Fax : 886-2-25521824
e-mail : rexluo@synology.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108160052.IAA15039>