mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
a91258913f
This commit removes everything from the repository except the core SPL implementation for Linux. Those files which remain have been moved to non-conflicting locations to facilitate the merge. The README.md and associated files have been updated accordingly. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
59 lines
2.0 KiB
Plaintext
59 lines
2.0 KiB
Plaintext
dnl #
|
|
dnl # Enabled by default it provides a minimal level of memory tracking.
|
|
dnl # A total count of bytes allocated is kept for each alloc and free.
|
|
dnl # Then at module unload time a report to the console will be printed
|
|
dnl # if memory was leaked.
|
|
dnl #
|
|
AC_DEFUN([SPL_AC_DEBUG_KMEM], [
|
|
AC_ARG_ENABLE([debug-kmem],
|
|
[AS_HELP_STRING([--enable-debug-kmem],
|
|
[Enable basic kmem accounting @<:@default=no@:>@])],
|
|
[],
|
|
[enable_debug_kmem=no])
|
|
|
|
AS_IF([test "x$enable_debug_kmem" = xyes],
|
|
[
|
|
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
|
|
DEBUG_KMEM="_with_debug_kmem"
|
|
AC_DEFINE([DEBUG_KMEM], [1],
|
|
[Define to 1 to enable basic kmem accounting])
|
|
], [
|
|
DEBUG_KMEM="_without_debug_kmem"
|
|
])
|
|
|
|
AC_SUBST(DEBUG_KMEM)
|
|
AC_MSG_CHECKING([whether basic kmem accounting is enabled])
|
|
AC_MSG_RESULT([$enable_debug_kmem])
|
|
])
|
|
|
|
dnl #
|
|
dnl # Disabled by default it provides detailed memory tracking. This
|
|
dnl # feature also requires --enable-debug-kmem to be set. When enabled
|
|
dnl # not only will total bytes be tracked but also the location of every
|
|
dnl # alloc and free. When the SPL module is unloaded a list of all leaked
|
|
dnl # addresses and where they were allocated will be dumped to the console.
|
|
dnl # Enabling this feature has a significant impact on performance but it
|
|
dnl # makes finding memory leaks pretty straight forward.
|
|
dnl #
|
|
AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [
|
|
AC_ARG_ENABLE([debug-kmem-tracking],
|
|
[AS_HELP_STRING([--enable-debug-kmem-tracking],
|
|
[Enable detailed kmem tracking @<:@default=no@:>@])],
|
|
[],
|
|
[enable_debug_kmem_tracking=no])
|
|
|
|
AS_IF([test "x$enable_debug_kmem_tracking" = xyes],
|
|
[
|
|
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
|
|
DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
|
|
AC_DEFINE([DEBUG_KMEM_TRACKING], [1],
|
|
[Define to 1 to enable detailed kmem tracking])
|
|
], [
|
|
DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
|
|
])
|
|
|
|
AC_SUBST(DEBUG_KMEM_TRACKING)
|
|
AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
|
|
AC_MSG_RESULT([$enable_debug_kmem_tracking])
|
|
])
|