mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Remove all remnants of FSHOW and QSHOW
Keep whatever little bit of C code was enabled by qshow for #+win32, and good riddance to everything else.
This commit is contained in:
parent
a0cce53130
commit
6bcc976b70
|
|
@ -170,16 +170,3 @@ For the reasons above, calling user code, i.e. functions passed in, or
|
|||
in other words code that one cannot reason about, from non-reentrant
|
||||
code (holding locks), @code{WITHOUT-INTERRUPTS}, @code{WITHOUT-GCING}
|
||||
is dangerous and best avoided.
|
||||
|
||||
@section Debugging
|
||||
|
||||
It is not easy to debug signal problems. The best bet probably is to
|
||||
enable @code{QSHOW} in runtime.h and once
|
||||
SBCL runs into problems attach gdb. A simple @code{thread apply all
|
||||
ba} is already tremendously useful. Another possibility is to send a
|
||||
SIGABRT to SBCL to provoke landing in LDB, if it's compiled with it
|
||||
and it has not yet done so on its own.
|
||||
|
||||
Note, that fprintf used by QSHOW is not reentrant and at least on x86
|
||||
linux it is known to cause deadlocks, so place SHOW and co carefully,
|
||||
ideally to places where blockable signals are blocked.
|
||||
|
|
|
|||
|
|
@ -656,11 +656,6 @@ case "$sbcl_os" in
|
|||
win32)
|
||||
printf ' :win32' >> $ltf
|
||||
#
|
||||
# Optional features -- We enable them by default, but the build
|
||||
# ought to work perfectly without them:
|
||||
#
|
||||
printf ' :sb-qshow' >> $ltf
|
||||
#
|
||||
# Required features -- Some of these used to be optional, but
|
||||
# building without them is no longer considered supported:
|
||||
#
|
||||
|
|
|
|||
|
|
@ -109,12 +109,6 @@
|
|||
;; original CMU CL code.)
|
||||
; :sb-show-assem
|
||||
|
||||
;; Compile the C runtime with support for low-level debugging output
|
||||
;; through FSHOW. If enabled, this feature allows
|
||||
;; users to turn on such debugging output using environment variables at
|
||||
;; run-time.
|
||||
; :sb-qshow
|
||||
|
||||
;; Enable code for collecting statistics on usage of various operations,
|
||||
;; useful for performance tuning of the SBCL system itself. This code
|
||||
;; is probably pretty stale (having not been tested since the fork from
|
||||
|
|
|
|||
|
|
@ -271,8 +271,6 @@ memory_fault_handler(int signal, siginfo_t *siginfo, os_context_t *context)
|
|||
os_restore_tls_segment_register(context);
|
||||
#endif
|
||||
|
||||
FSHOW((stderr, "Memory fault at: %p, PC: %p\n", fault_addr, OS_CONTEXT_PC(context)));
|
||||
|
||||
#ifdef LISP_FEATURE_SB_SAFEPOINT
|
||||
if (handle_safepoint_violation(context, fault_addr)) return;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ funcall0(lispobj function)
|
|||
{
|
||||
lispobj *args = NULL;
|
||||
|
||||
FSHOW((stderr, "/entering funcall0(0x%lx)\n", (long)function));
|
||||
return call_into_lisp(function, args, 0);
|
||||
}
|
||||
lispobj
|
||||
|
|
|
|||
|
|
@ -2182,7 +2182,6 @@ bool maybe_gc(os_context_t *context)
|
|||
check_gc_signals_unblocked_or_lose(os_context_sigmask_addr(context));
|
||||
unblock_gc_stop_signal();
|
||||
#endif
|
||||
FSHOW((stderr, "/maybe_gc: calling SUB_GC\n"));
|
||||
/* FIXME: Nothing must go wrong during GC else we end up running
|
||||
* the debugger, error handlers, and user code in general in a
|
||||
* potentially unsafe place. Running out of the control stack or
|
||||
|
|
@ -2190,8 +2189,6 @@ bool maybe_gc(os_context_t *context)
|
|||
* cannot be unblocked because there may be a pending handler, or
|
||||
* we may even be in a WITHOUT-INTERRUPTS. */
|
||||
gc_happened = funcall1(StaticSymbolFunction(SUB_GC), 0);
|
||||
FSHOW((stderr, "/maybe_gc: gc_happened=%s\n",
|
||||
gc_happened == NIL ? "NIL" : gc_happened == LISP_T ? "T" : "0"));
|
||||
/* gc_happened can take three values: T, NIL, 0.
|
||||
*
|
||||
* T means that the thread managed to trigger a GC, and post-gc
|
||||
|
|
@ -2223,11 +2220,9 @@ bool maybe_gc(os_context_t *context)
|
|||
check_gc_signals_unblocked_or_lose(0);
|
||||
#endif
|
||||
#endif
|
||||
FSHOW((stderr, "/maybe_gc: calling POST_GC\n"));
|
||||
funcall0(StaticSymbolFunction(POST_GC));
|
||||
#ifndef LISP_FEATURE_WIN32
|
||||
} else {
|
||||
FSHOW((stderr, "/maybe_gc: punting on POST_GC due to blockage\n"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -2241,7 +2236,6 @@ bool maybe_gc(os_context_t *context)
|
|||
block_blockable_signals(0);
|
||||
}
|
||||
|
||||
FSHOW((stderr, "/maybe_gc: returning\n"));
|
||||
return (gc_happened != NIL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ default_lossage_handler(void)
|
|||
}
|
||||
static void (*lossage_handler)(void) = default_lossage_handler;
|
||||
|
||||
#if QSHOW
|
||||
#ifdef LISP_FEATURE_WIN32
|
||||
static void
|
||||
configurable_lossage_handler()
|
||||
{
|
||||
|
|
@ -72,11 +72,7 @@ configurable_lossage_handler()
|
|||
"infinite sleep call, maximizing your chances that the thread's current\n"
|
||||
"state can be preserved until you attach an external debugger. Good luck!\n");
|
||||
for (;;)
|
||||
# ifdef LISP_FEATURE_WIN32
|
||||
Sleep(10000);
|
||||
# else
|
||||
sleep(10);
|
||||
# endif
|
||||
}
|
||||
|
||||
ldb_monitor();
|
||||
|
|
@ -85,7 +81,7 @@ configurable_lossage_handler()
|
|||
|
||||
void enable_lossage_handler(void)
|
||||
{
|
||||
#if QSHOW
|
||||
#ifdef LISP_FEATURE_WIN32
|
||||
lossage_handler = configurable_lossage_handler;
|
||||
#else
|
||||
lossage_handler = ldb_monitor;
|
||||
|
|
|
|||
|
|
@ -1733,8 +1733,6 @@ arrange_return_to_c_function(os_context_t *context,
|
|||
*os_context_register_addr(context,reg_CODE) =
|
||||
(os_context_register_t)((char*)fun + FUN_POINTER_LOWTAG);
|
||||
#endif
|
||||
FSHOW((stderr, "/arranged return to Lisp function (0x%lx)\n",
|
||||
(long)function));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -2222,7 +2220,6 @@ handle_trap(os_context_t *context, int trap)
|
|||
switch(trap) {
|
||||
#ifndef LISP_FEATURE_WIN32
|
||||
case trap_PendingInterrupt:
|
||||
FSHOW((stderr, "/<trap pending interrupt>\n"));
|
||||
arch_skip_instruction(context);
|
||||
interrupt_handle_pending(context);
|
||||
break;
|
||||
|
|
@ -2238,7 +2235,6 @@ handle_trap(os_context_t *context, int trap)
|
|||
#else
|
||||
# define CONTINUABLE_P (trap==trap_Cerror)
|
||||
#endif
|
||||
FSHOW((stderr, "/<trap error/cerror %d>\n", trap));
|
||||
interrupt_internal_error(context, CONTINUABLE_P);
|
||||
break;
|
||||
case trap_Breakpoint:
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@
|
|||
#include <inttypes.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
struct dyndebug_config dyndebug_config = {
|
||||
QSHOW == 2,
|
||||
};
|
||||
struct dyndebug_config dyndebug_config;
|
||||
|
||||
void
|
||||
dyndebug_init()
|
||||
|
|
@ -54,7 +52,6 @@ dyndebug_init()
|
|||
char *names[DYNDEBUG_NFLAGS];
|
||||
int *ptrs[DYNDEBUG_NFLAGS];
|
||||
|
||||
dyndebug_init1(fshow, "FSHOW");
|
||||
dyndebug_init1(gencgc_verbose, "GENCGC_VERBOSE");
|
||||
dyndebug_init1(safepoints, "SAFEPOINTS");
|
||||
dyndebug_init1(seh, "SEH");
|
||||
|
|
|
|||
|
|
@ -776,8 +776,6 @@ initialize_lisp(int argc, char *argv[], char *envp[])
|
|||
core_string = core;
|
||||
posix_argv = options.argv;
|
||||
|
||||
FSHOW((stderr, "/funcalling initial_function=0x%lx\n",
|
||||
(unsigned long)initial_function));
|
||||
create_main_lisp_thread(initial_function);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,17 +87,6 @@ void gc_state_unlock();
|
|||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The next few defines serve as configuration -- edit them inline if
|
||||
* you are a developer and want to affect FSHOW behaviour.
|
||||
*/
|
||||
|
||||
#ifdef LISP_FEATURE_SB_QSHOW
|
||||
# define QSHOW 1
|
||||
#else
|
||||
# define QSHOW 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Configuration options end here -- the following defines do not
|
||||
* generally need customization.
|
||||
|
|
@ -106,7 +95,6 @@ void gc_state_unlock();
|
|||
/* Flags defined in a structure to avoid code duplication between
|
||||
* declaration and definition. */
|
||||
extern struct dyndebug_config {
|
||||
int dyndebug_fshow;
|
||||
int dyndebug_gencgc_verbose;
|
||||
int dyndebug_safepoints;
|
||||
int dyndebug_seh;
|
||||
|
|
@ -125,15 +113,6 @@ extern int gencgc_verbose;
|
|||
|
||||
void dyndebug_init(void);
|
||||
|
||||
#if 0
|
||||
/* To see output from FSHOW - which is almost certainly a bad idea because it's
|
||||
* quite likely to hinder your progress by causing deadlock in stdio - then change
|
||||
* the preceding line to "#if 1" */
|
||||
# define FSHOW(args) fprintf args
|
||||
#else
|
||||
# define FSHOW(args)
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
#define AMD64_SYSV_ABI __attribute__((sysv_abi))
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -236,8 +236,6 @@ void arch_skip_instruction(os_context_t *context)
|
|||
break;
|
||||
}
|
||||
|
||||
FSHOW((stderr,
|
||||
"/[arch_skip_inst resuming at %x]\n", OS_CONTEXT_PC(context)));
|
||||
}
|
||||
|
||||
unsigned char *
|
||||
|
|
|
|||
|
|
@ -126,8 +126,6 @@ void arch_skip_instruction(os_context_t *context)
|
|||
break;
|
||||
}
|
||||
|
||||
FSHOW((stderr,
|
||||
"/[arch_skip_inst resuming at %x]\n", OS_CONTEXT_PC(context)));
|
||||
}
|
||||
|
||||
unsigned char *
|
||||
|
|
|
|||
Loading…
Reference in a new issue