Skip to content

Commit

Permalink
Disable "-fipa-sra" when using "--enable-debuginfo" (openzfs#127)
Browse files Browse the repository at this point in the history
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 openzfs#9921
  • Loading branch information
Prakash Surya authored Feb 13, 2020
1 parent 854ba47 commit 86faae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 86faae6

Please sign in to comment.