From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Wed, 13 Mar 2019 19:15:13 +0300 From: Cyrill Gorcunov Subject: Re: [PATCH 3/3] lib/core/fiber: Put watermarks into stack to track its usage Message-ID: <20190313161513.GP10420@uranus.lan> References: <20190312224721.8053-1-gorcunov@gmail.com> <20190312224721.8053-4-gorcunov@gmail.com> <20190313135204.x7gn54iqiy5ulavn@esperanza> <20190313140054.GO10420@uranus.lan> <20190313141724.wgt5xt3ey2shmtlo@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190313141724.wgt5xt3ey2shmtlo@esperanza> To: Vladimir Davydov Cc: tml List-ID: On Wed, Mar 13, 2019 at 05:17:24PM +0300, Vladimir Davydov wrote: > > Yeah, keep track of the max recorded stack size in a static variable > and keep advancing the higher watermark position whenever it gets > overwritten so that we can report max stack size used: > > I> max stack size is 73728 bytes > ... > I> max stack size is 112640 bytes > > (the wording might need polishing) I see what you mean. Will try. > > > > Won't they left unitialized then? The only reason I put nils here > > is to force them have known values even if they are unused. > > I'd set them to NULLs for both cases, i.e. outside ifdef. OK