Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2017 13:52:14 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Lev Serebryakov <lev@freebsd.org>
Cc:        FreeBSD <freebsd-stable@freebsd.org>, freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?
Message-ID:  <CAOtMX2iJtWmtNs%2BC%2BT7zLpJwkr4wNXprGSo15F_R74U5YrQWCQ@mail.gmail.com>
In-Reply-To: <492944119.20170222234742@serebryakov.spb.ru>
References:  <492944119.20170222234742@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
The panic is definitely a bug.  You should create a bug on bugzilla
for that one, if it isn't there already.

It's to be expected that a lot of FBT probes won't be present in the
default build.  But there are two ways to ameliorate that:
1) Add a "__noinline" attribute to any function you want to trace
2) Add "#pragma clang optimize off" and "#pragma clang optimize on"
around the code you want to debug.  Note that even with optimization
disabled, clang may still choose to inline static functions.  But it
does make stack traces easier to debug.

-Alan

On Wed, Feb 22, 2017 at 1:47 PM, Lev Serebryakov <lev@freebsd.org> wrote:
> Hello Freebsd-stable,
>
>    Now if you build zfs.ko with -O0 it panics on boot.
>
>    If you use default optimization level, a lot of fbt DTreace probes are
>   missing.
>
> --
> Best regards,
>  Lev                          mailto:lev@FreeBSD.org
>
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iJtWmtNs%2BC%2BT7zLpJwkr4wNXprGSo15F_R74U5YrQWCQ>