From owner-freebsd-current Wed Aug 15 17:51:36 2001 Delivered-To: freebsd-current@freebsd.org Received: from synology.com (dns1.synology.com [202.173.37.131]) by hub.freebsd.org (Postfix) with ESMTP id A78E637B401 for ; Wed, 15 Aug 2001 17:51:30 -0700 (PDT) (envelope-from rexluo@synology.com) Received: from synology.com (IDENT:nobody@localhost [127.0.0.1]) by synology.com (8.9.3/8.9.3) with SMTP id IAA15039; Thu, 16 Aug 2001 08:52:32 +0800 Date: Thu, 16 Aug 2001 08:52:32 +0800 Message-Id: <200108160052.IAA15039@synology.com> To: Julian Elischer , current@FreeBSD.ORG Subject: Re: Kernel stack hogs list available From: Rex Luo X-Mailer: TWIG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG May I ask where to get this utility? Thanks! Julian Elischer 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