Drop KTR records when we're in the debugger so that the debugger isn't

changing or overwriting the trace buffer. When KTR is enabled for things
like traps or pmap functions, the amount of logging can be substantial.
This commit is contained in:
Marcel Moolenaar 2014-07-02 22:13:07 +00:00
parent 7cc2e524b5
commit 054b57a740
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=268186

View File

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/alq.h>
#include <sys/cons.h>
#include <sys/cpuset.h>
#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/libkern.h>
@ -323,7 +324,7 @@ ktr_tracepoint(u_int mask, const char *file, int line, const char *format,
#endif
int cpu;
if (panicstr)
if (panicstr || kdb_active)
return;
if ((ktr_mask & mask) == 0 || ktr_buf == NULL)
return;