From owner-freebsd-hackers@freebsd.org Sun Jan 3 16:57:29 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06719A5FA43 for ; Sun, 3 Jan 2016 16:57:29 +0000 (UTC) (envelope-from robbinsondefau@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCA8D1FCD for ; Sun, 3 Jan 2016 16:57:28 +0000 (UTC) (envelope-from robbinsondefau@gmail.com) Received: by mail-io0-x229.google.com with SMTP id 1so91152778ion.1 for ; Sun, 03 Jan 2016 08:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=co0OTRC8mK+TFCMdXHMKcjDbKbSsHxJo7hjcmXhKX30=; b=KpwYBk2XbgLaOhApKBIF3v2LgEGJSyysuBMsUcKHcktBPPLyeAPKwvzVqXk/dbez3s RR+I9huWXEEGKgYyU5ko9YwesnM0PWgsc1z2sorrgf580Oc65kcNYAFXsmpeew306VPt mytnIAQ5MYT23Hrr1/6++abLwT0E2qNHPipmvLfCePJCsFYAftdsX/zjMeky4sc7pqSK iLkm/oaviIZUFybnIP/B4r/1sJiyDg1Pm7iboa1r3iOI11Bp6wiQ9MC8CvFrchR8IKbQ /gSxPAkKMr2D0LHp49B25x1rQUJOD4sEWduytdTECIrKSemlbwe5tOEF1nsjk4qDoZQX WoLA== MIME-Version: 1.0 X-Received: by 10.107.166.78 with SMTP id p75mr72072970ioe.59.1451840248270; Sun, 03 Jan 2016 08:57:28 -0800 (PST) Received: by 10.36.29.20 with HTTP; Sun, 3 Jan 2016 08:57:28 -0800 (PST) In-Reply-To: <568930A0.6010405@kahnews.net> References: <568930A0.6010405@kahnews.net> Date: Sun, 3 Jan 2016 17:57:28 +0100 Message-ID: Subject: Re: variables optimized out From: robbinson defau To: "Kristian A. Hiorth" Cc: freebsd-hackers@freebsd.org X-Mailman-Approved-At: Sun, 03 Jan 2016 17:40:39 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2016 16:57:29 -0000 Hi, That seems to help a lot. Thanks for the info! /DF On Sun, Jan 3, 2016 at 3:30 PM, Kristian A. Hiorth wrote: > On 01/03/2016 02:38 PM, robbinson defau wrote: > >> Hi all, >> >> Im debugging some issues in the kernel and as the kernel is compiled by >> default with -O2, a lot of variables are optimized out. So i made changes >> to make.conf (CFLAGS and COPTFLAGS).\ >> >> All builds fine, but I get the weirdest of panics that most certainly not >> happen with -O2. So it's likely i'm doing something wrong. What would be >> the correct way to be able to debug the kernel and have it build such that >> locals and function arguments are not optimized out? >> >> Thanks in advance, >> >> /DF >> > > Hi, > > sounds like stack overflows, did you try increasing kernel stack size? > Stuff like WITNESS causes a lot of stack growth when the optimizer inlines > fewer calls. > > I've run an -O0 kernel with > options KSTACK_PAGES=6 > > without too many problems. > > Hope this helps, > Kristian > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >