From 147622b2f1e5d8c51b1aeb4735d5e0fa5c91ff78 Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Mon, 3 Feb 2020 09:21:05 -0800 Subject: 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 Reviewed-by: Brian Behlendorf Reviewed-by: Igor Kozhukhov Reviewed-by: George Melikov Signed-off-by: Prakash Surya Closes #9921 --- config/zfs-build.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/zfs-build.m4') 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" -- cgit v1.2.3