Partially revert revision 1.7: Only use getnanotime instead of
nanotime if we would run into trouble with nanotime (i.e. if we are tracing KTR_LOCK). Reviewed by: jhb
This commit is contained in:
parent
8cccb2b798
commit
4de9e65520
@ -128,7 +128,15 @@ ktr_tracepoint(u_int mask, char *format, u_long arg1, u_long arg2, u_long arg3,
|
||||
} while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0);
|
||||
entry = &ktr_buf[saveindex];
|
||||
restore_intr(saveintr);
|
||||
getnanotime(&entry->ktr_tv);
|
||||
if (ktr_mask & KTR_LOCK)
|
||||
/*
|
||||
* We can't use nanotime with KTR_LOCK, it would cause
|
||||
* endless recursion, at least under the Intel
|
||||
* architecture.
|
||||
*/
|
||||
getnanotime(&entry->ktr_tv);
|
||||
else
|
||||
nanotime(&entry->ktr_tv);
|
||||
#ifdef KTR_EXTEND
|
||||
strncpy(entry->ktr_filename, filename, KTRFILENAMESIZE - 1);
|
||||
entry->ktr_filename[KTRFILENAMESIZE - 1] = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user