Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

Alan Somers asomers at freebsd.org
Wed Feb 22 20:52:15 UTC 2017


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 at 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 at FreeBSD.org
>
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"


More information about the freebsd-fs mailing list