Skip to content

Commit

Permalink
Make "-fno-inline" compile option more accessible
Browse files Browse the repository at this point in the history
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 openzfs#6605
  • Loading branch information
Prakash Surya authored and tonyhutter committed Mar 8, 2018
1 parent f4bb32f commit 4b824be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/zfs-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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], [
Expand Down

0 comments on commit 4b824be

Please sign in to comment.