ktr: Make debug.ktr.verbose available whenever KTR is configured
This is more useful and matches the documentation. While here, make it settable as a tunable and add a sysctl description. PR: 139425 MFC after: 2 weeks
This commit is contained in:
+5
-4
@@ -251,9 +251,12 @@ SYSCTL_PROC(_debug_ktr, OID_AUTO, entries,
|
||||
|
||||
#ifdef KTR_VERBOSE
|
||||
int ktr_verbose = KTR_VERBOSE;
|
||||
TUNABLE_INT("debug.ktr.verbose", &ktr_verbose);
|
||||
SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RW, &ktr_verbose, 0, "");
|
||||
#else
|
||||
int ktr_verbose = 0;
|
||||
#endif
|
||||
TUNABLE_INT("debug.ktr.verbose", &ktr_verbose);
|
||||
SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RWTUN, &ktr_verbose, 0,
|
||||
"Print extra info when logging to the console");
|
||||
|
||||
#ifdef KTR_ALQ
|
||||
struct alq *ktr_alq;
|
||||
@@ -375,7 +378,6 @@ ktr_tracepoint(uint64_t mask, const char *file, int line, const char *format,
|
||||
file += 3;
|
||||
entry->ktr_file = file;
|
||||
entry->ktr_line = line;
|
||||
#ifdef KTR_VERBOSE
|
||||
if (ktr_verbose) {
|
||||
#ifdef SMP
|
||||
printf("cpu%d ", cpu);
|
||||
@@ -387,7 +389,6 @@ ktr_tracepoint(uint64_t mask, const char *file, int line, const char *format,
|
||||
printf(format, arg1, arg2, arg3, arg4, arg5, arg6);
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
entry->ktr_desc = format;
|
||||
entry->ktr_parms[0] = arg1;
|
||||
entry->ktr_parms[1] = arg2;
|
||||
|
||||
Reference in New Issue
Block a user