]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Make "-fno-inline" compile option more accessible
authorPrakash Surya <prakash.surya@delphix.com>
Fri, 15 Sep 2017 18:47:11 +0000 (11:47 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 15 Sep 2017 18:47:11 +0000 (11:47 -0700)
When functions are inlined, it can make the system much more difficult
to instrument using tools such as ftrace, BPF, crash, etc. Thus, to aid
development and increase the system's observability, when the
"--enable-debuginfo" flag is specified, the "-fno-inline" compilation
option will be used for both userspace and kernel modules.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <prakash.surya@delphix.com>
Closes #6605

config/zfs-build.m4

index b84658a6489a90cfc11ca40fb1eb5a7f05653e6d..c695a882ee73f3731e67963a56ddeb59452780b1 100644 (file)
@@ -45,10 +45,11 @@ AC_DEFUN([ZFS_AC_DEBUG], [
 
 AC_DEFUN([ZFS_AC_DEBUGINFO_KERNEL], [
        KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS CONFIG_DEBUG_INFO=y"
+       KERNELCPPFLAGS="${KERNELCPPFLAGS} -fno-inline"
 ])
 
 AC_DEFUN([ZFS_AC_DEBUGINFO_USER], [
-       DEBUG_CFLAGS="$DEBUG_CFLAGS -g"
+       DEBUG_CFLAGS="${DEBUG_CFLAGS} -g -fno-inline"
 ])
 
 AC_DEFUN([ZFS_AC_DEBUGINFO], [