Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Aug 2016 05:11:32 +0200
From:      Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@FreeBSD.org>
To:        Zaphod Beeblebrox <zbeeble@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: How to get better debugging for the kernel.
Message-ID:  <20160804031132.GA4832@brick>
In-Reply-To: <CACpH0Mcw1oTatUX3d7gJ4ys=dAj_y9C9vF_g110MrHVEup4mjQ@mail.gmail.com>
References:  <CACpH0Mcw1oTatUX3d7gJ4ys=dAj_y9C9vF_g110MrHVEup4mjQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 0802T1735, Zaphod Beeblebrox wrote:
> I have just filed bug 211535.  I'd like to be more helpful, but I'm having
> some trouble with the level of optimization in the kernel.  Much of kgdb's
> output tells me that the value I'm looking for has been optimized away.
> 
> So... how do I compile a kernel or a module without optimization _and_ how
> badly will that affect the runtime of a lightly loaded server?
> 
> My kernel is already compiled with -g.  That tells me that I'm looking in
> zap_leaf.c (part of ZFS).  Can I simply compile zap_leaf.c without
> optimization?

You can try putting "#pragma clang optimize off" at the top of the file.




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