diff options
author | jeff <jeff@FreeBSD.org> | 2005-06-10 23:21:29 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-06-10 23:21:29 +0000 |
commit | d372186b525dd6c38a5a9d5d8a052f1f7a7aa75d (patch) | |
tree | f375fa678e1498a3bc018ac99b51d753f98a6739 /sys/kern/kern_ktr.c | |
parent | ea579c14c6c7b891cde589847563ce088a3205a5 (diff) | |
download | FreeBSD-src-d372186b525dd6c38a5a9d5d8a052f1f7a7aa75d.zip FreeBSD-src-d372186b525dd6c38a5a9d5d8a052f1f7a7aa75d.tar.gz |
- Add curthread to the state that ktr is saving. The extra information is
well worth the bloat.
- Change the formatting of 'show ktr' slightly to accommodate the
additional field. Remove a tab from the verbose output and place the
actual trace data after a : so it is more easy to understand which
part is the event and which is part of the record.
Diffstat (limited to 'sys/kern/kern_ktr.c')
-rw-r--r-- | sys/kern/kern_ktr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c index e23d972..b6d9098 100644 --- a/sys/kern/kern_ktr.c +++ b/sys/kern/kern_ktr.c @@ -221,6 +221,7 @@ ktr_tracepoint(u_int mask, const char *file, int line, const char *format, #endif entry->ktr_timestamp = KTR_TIME; entry->ktr_cpu = cpu; + entry->ktr_thread = curthread; if (file != NULL) while (strncmp(file, "../", 3) == 0) file += 3; @@ -305,14 +306,16 @@ db_mach_vtrace(void) db_printf("--- End of trace buffer ---\n"); return (0); } - db_printf("%d: ", tstate.cur); + db_printf("%d (%p", tstate.cur, kp->ktr_thread); #ifdef SMP - db_printf("cpu%d ", kp->ktr_cpu); + db_printf(":cpu%d", kp->ktr_cpu); #endif + db_printf(")"); if (db_ktr_verbose) { - db_printf("%10.10lld %s.%d\t", (long long)kp->ktr_timestamp, + db_printf(" %10.10lld %s.%d", (long long)kp->ktr_timestamp, kp->ktr_file, kp->ktr_line); } + db_printf(": "); db_printf(kp->ktr_desc, kp->ktr_parms[0], kp->ktr_parms[1], kp->ktr_parms[2], kp->ktr_parms[3], kp->ktr_parms[4], kp->ktr_parms[5]); |