Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jan 2016 17:57:28 +0100
From:      robbinson defau <robbinsondefau@gmail.com>
To:        "Kristian A. Hiorth" <kah@kahnews.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: variables optimized out
Message-ID:  <CAA99N-MaHyBO4zH-pN=k7GZvRZWMaMpFijM-2s6hahyRjK8DWQ@mail.gmail.com>
In-Reply-To: <568930A0.6010405@kahnews.net>
References:  <CAA99N-OKyxzVaJ4ayXRUGAoovNtHFXTpOXPkwhdw9k3LEMnOtw@mail.gmail.com> <568930A0.6010405@kahnews.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

That seems to help a lot. Thanks for the info!

/DF

On Sun, Jan 3, 2016 at 3:30 PM, Kristian A. Hiorth <kah@kahnews.net> 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"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAA99N-MaHyBO4zH-pN=k7GZvRZWMaMpFijM-2s6hahyRjK8DWQ>