]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Disable automatic log dumping
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 5 Feb 2013 23:59:36 +0000 (15:59 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 6 Feb 2013 00:13:27 +0000 (16:13 -0800)
Long ago infrastructure was added to the SPL to keep an internal
debug log of the last few seconds of activity.  This was helpful
during the early development, but these days it is no longer
needed.  I haven't had to resort to this debug buffer to resolve
an issue for several years now.

Today better more generic tools like systemtap and ftrace have
evolved to the point where they can be used for this purpose.
Along with the stack trace dumped to the system console, and in
rare cases a crash dump we almost always have the debug we need.

Therefore, I'm disabling the code which automatically dumps
this log to disk during an assertion except for the case where
spl_debug_panic_on_bug is set (disabled by default).

This should be viewed as a first step towards either.

  a) Retiring this infrastructure and complexity entirely, or
  b) Integrating this logging more properly with ftrace.

As part of this change I'm also removing from the packages the
undocumented spl utility which is used to decode the binary logs.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
cmd/Makefile.am
module/spl/spl-debug.c

index c1e841dfe3a29bbd7851a53bf5456f6a8cc593b2..fed6feec2f79c3c344b44884c69042c6a254c5ab 100644 (file)
@@ -3,7 +3,8 @@ include $(top_srcdir)/config/Rules.am
 DEFAULT_INCLUDES += \
        -I$(top_srcdir)/lib
 
-sbin_PROGRAMS = spl splat
+noinst_PROGRAMS = spl
+sbin_PROGRAMS = splat
 
 spl_SOURCES = spl.c
 
index 0dd59db56e69ab6cbb60d08d154b390c29d4b12b..3c3dab0c87462dc19090bb7ed7449e38b021d2d6 100644 (file)
@@ -1099,10 +1099,11 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags)
                 spl_panic_in_progress = 1;
 
         spl_debug_dumpstack(NULL);
-        spl_debug_dumplog(flags);
 
-        if (spl_debug_panic_on_bug)
+        if (spl_debug_panic_on_bug) {
+                spl_debug_dumplog(flags);
                 panic("SPL PANIC");
+        }
 
         set_task_state(current, TASK_UNINTERRUPTIBLE);
         while (1)