git: bd11e253a9a4 - main - Add _sleep to TSLOG

Colin Percival cperciva at FreeBSD.org
Sun Sep 5 19:51:52 UTC 2021


The branch main has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=bd11e253a9a459c9a7b69ebb1c68f0162eb6119f

commit bd11e253a9a459c9a7b69ebb1c68f0162eb6119f
Author:     Colin Percival <cperciva at FreeBSD.org>
AuthorDate: 2021-09-05 19:50:15 +0000
Commit:     Colin Percival <cperciva at FreeBSD.org>
CommitDate: 2021-09-05 19:50:15 +0000

    Add _sleep to TSLOG
    
    Most of the nvme initialization time in my tests is being spent here
    (via pause_sbt).
---
 sys/kern/kern_synch.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 89b937315907..930bd940d2ab 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -141,6 +141,7 @@ _sleep(const void *ident, struct lock_object *lock, int priority,
 	int catch, pri, rval, sleepq_flags;
 	WITNESS_SAVE_DECL(lock_witness);
 
+	TSENTER();
 	td = curthread;
 #ifdef KTRACE
 	if (KTRPOINT(td, KTR_CSW))
@@ -233,6 +234,7 @@ _sleep(const void *ident, struct lock_object *lock, int priority,
 		class->lc_lock(lock, lock_state);
 		WITNESS_RESTORE(lock, lock_witness);
 	}
+	TSEXIT();
 	return (rval);
 }
 


More information about the dev-commits-src-all mailing list