aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2020-02-03 09:21:05 -0800
committerGitHub <[email protected]>2020-02-03 09:21:05 -0800
commit147622b2f1e5d8c51b1aeb4735d5e0fa5c91ff78 (patch)
tree85f977aa55292b3515fe3628c7bcf894342293ec
parent591505dc2737bcd77c587e369e1d91b0fd97325c (diff)
Disable "-fipa-sra" when using "--enable-debuginfo"
To better enable dynamic tracing tools (e.g. "bpftrace") this change disables the "-fipa-sra" compilation optimization. This way, function signatures are not changed by the compiler, which allows us to better attach to kprobes and kretprobes with dynamic tracing tools. Otherwise, the compiler may append ".isra" to the function name, and possibly change the function arguments as well. Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Prakash Surya <[email protected]> Closes #9921
-rw-r--r--config/zfs-build.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index 91fe04844..5b53e9c5c 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -59,9 +59,9 @@ AC_DEFUN([ZFS_AC_DEBUG], [
])
AC_DEFUN([ZFS_AC_DEBUGINFO_ENABLE], [
- DEBUG_CFLAGS="$DEBUG_CFLAGS -g -fno-inline"
+ DEBUG_CFLAGS="$DEBUG_CFLAGS -g -fno-inline -fno-ipa-sra"
- KERNEL_DEBUG_CFLAGS="$KERNEL_DEBUG_CFLAGS -fno-inline"
+ KERNEL_DEBUG_CFLAGS="$KERNEL_DEBUG_CFLAGS -fno-inline -fno-ipa-sra"
KERNEL_MAKE="$KERNEL_MAKE CONFIG_DEBUG_INFO=y"
DEBUGINFO_ZFS="_with_debuginfo"