Skip to content

Commit

Permalink
Retire legacy debugging infrastructure
Browse files Browse the repository at this point in the history
When the SPL was originally written Linux tracepoints were still
in their infancy.  Therefore, an entire debugging subsystem was
added to facilite tracing which served us well for many years.

Now that Linux tracepoints have matured they provide all the
functionality of the previous tracing subsystem.  Rather than
maintain parallel functionality it makes sense to fully adopt
tracepoints.  Therefore, this patch retires the legacy debugging
infrastructure.

See openzfs/zfs@bc9f413 for the tracepoint changes.

Signed-off-by: Ned Bass <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#408
  • Loading branch information
behlendorf committed Nov 19, 2014
1 parent 917fef2 commit 8d9a23e
Show file tree
Hide file tree
Showing 26 changed files with 389 additions and 3,000 deletions.
3 changes: 0 additions & 3 deletions cmd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ include $(top_srcdir)/config/Rules.am
DEFAULT_INCLUDES += \
-I$(top_srcdir)/lib

noinst_PROGRAMS = spl
sbin_PROGRAMS = splat

spl_SOURCES = spl.c

splat_SOURCES = splat.c
splat_LDFLAGS = $(top_builddir)/lib/libcommon.la

Expand Down
243 changes: 0 additions & 243 deletions cmd/spl.c

This file was deleted.

36 changes: 1 addition & 35 deletions config/spl-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
AC_SUBST(KERNELCPPFLAGS)
SPL_AC_DEBUG
SPL_AC_DEBUG_LOG
SPL_AC_DEBUG_KMEM
SPL_AC_DEBUG_KMEM_TRACKING
SPL_AC_TEST_MODULE
Expand Down Expand Up @@ -219,7 +218,7 @@ AC_DEFUN([SPL_AC_RPM], [
AC_MSG_RESULT([$HAVE_RPMBUILD])
])
RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_LOG) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"'
RPM_DEFINE_COMMON='--define "$(DEBUG_SPL) 1" --define "$(DEBUG_KMEM) 1" --define "$(DEBUG_KMEM_TRACKING) 1"'
RPM_DEFINE_UTIL=
RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)"'
RPM_DEFINE_DKMS=
Expand Down Expand Up @@ -452,39 +451,6 @@ AC_DEFUN([SPL_AC_DEBUG], [
AC_MSG_RESULT([$enable_debug])
])

dnl #
dnl # Enabled by default it provides a basic debug log infrastructure.
dnl # Each subsystem registers itself with a name and logs messages
dnl # using predefined types. If the debug mask it set to allow the
dnl # message type it will be written to the internal log. The log
dnl # can be dumped to a file by echoing 1 to the 'dump' proc entry,
dnl # after dumping the log it must be decoded using the spl utility.
dnl #
dnl # echo 1 >/proc/sys/kernel/spl/debug/dump
dnl # spl /tmp/spl-log.xxx.yyy /tmp/spl-log.xxx.yyy.txt
dnl #
AC_DEFUN([SPL_AC_DEBUG_LOG], [
AC_ARG_ENABLE([debug-log],
[AS_HELP_STRING([--enable-debug-log],
[Enable basic debug logging @<:@default=yes@:>@])],
[],
[enable_debug_log=yes])
AS_IF([test "x$enable_debug_log" = xyes],
[
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
DEBUG_LOG="_with_debug_log"
AC_DEFINE([DEBUG_LOG], [1],
[Define to 1 to enable basic debug logging])
], [
DEBUG_LOG="_without_debug_log"
])
AC_SUBST(DEBUG_LOG)
AC_MSG_CHECKING([whether basic debug logging is enabled])
AC_MSG_RESULT([$enable_debug_log])
])

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.
Expand Down
2 changes: 0 additions & 2 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/splat-ctl.h \
$(top_srcdir)/include/spl-ctl.h \
$(top_srcdir)/include/spl-debug.h \
$(top_srcdir)/include/spl-trace.h \
$(top_srcdir)/include/strings.h \
$(top_srcdir)/include/unistd.h

Expand Down
Loading

0 comments on commit 8d9a23e

Please sign in to comment.