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:
+2
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user