diff options
author | Brian Behlendorf <[email protected]> | 2017-09-15 10:24:13 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2017-09-15 10:24:13 -0700 |
commit | d9ec8b9b2a3880a1a2b68e57a25833486c3b164d (patch) | |
tree | 5378af5ce8db5338fe9432eab8e485408001525b /config | |
parent | 0107f69898e3b6d39d974b272da1739cb2f39027 (diff) |
Add configure option to enable gcov analysis
* Add configure option to enable gcov analysis.
* Includes a few minor ctime fixes.
* Add codecov.yml configuration.
Reviewed-by: Prakash Surya <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #6642
Diffstat (limited to 'config')
-rw-r--r-- | config/zfs-build.m4 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index a8609b829..b84658a64 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -75,6 +75,37 @@ AC_DEFUN([ZFS_AC_DEBUGINFO], [ AC_MSG_RESULT([$enable_debuginfo]) ]) +AC_DEFUN([ZFS_AC_GCOV_KERNEL], [ +]) + +AC_DEFUN([ZFS_AC_GCOV_USER], [ + DEBUG_CFLAGS="$DEBUG_CFLAGS -fprofile-arcs -ftest-coverage" +]) + +AC_DEFUN([ZFS_AC_GCOV], [ + AC_MSG_CHECKING([whether gcov profiling will be enabled]) + AC_ARG_ENABLE([gcov], + [AS_HELP_STRING([--enable-gcov], + [Enable gcov profiling @<:@default=no@:>@])], + [], + [enable_gcov=no]) + + AS_CASE(["x$enable_gcov"], + ["xyes"], + [ZFS_AC_GCOV_KERNEL + ZFS_AC_GCOV_USER], + ["xkernel"], + [ZFS_AC_GCOV_KERNEL], + ["xuser"], + [ZFS_AC_GCOV_USER], + ["xno"], + [], + [AC_MSG_ERROR([Unknown option $enable_gcov])]) + + AC_SUBST(DEBUG_CFLAGS) + AC_MSG_RESULT([$enable_gcov]) +]) + AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [ ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE ZFS_AC_CONFIG_ALWAYS_NO_BOOL_COMPARE |