Make ktr_verbose a bit more useful:

- On SMP systems display the cpu number with each message
- If ktr_verbose > 1, then include the filename and line number with each
  trace message
This commit is contained in:
John Baldwin 2000-11-15 21:51:53 +00:00
parent aa4d4d3b16
commit 22f1b34223
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68782

View File

@ -131,6 +131,11 @@ ktr_tracepoint(u_int mask, char *format, u_long arg1, u_long arg2, u_long arg3,
vsnprintf(entry->ktr_desc, KTRDESCSIZE, format, ap);
va_end(ap);
if (ktr_verbose) {
#ifdef SMP
printf("cpu%d ", entry->ktr_cpu);
#endif
if (ktr_verbose > 1)
printf("%s.%d\t", entry->ktr_filename, entry->ktr_line);
va_start(ap, format);
vprintf(format, ap);
printf("\n");