Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Sep 2021 19:51:51 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: bd11e253a9a4 - main - Add _sleep to TSLOG
Message-ID:  <202109051951.185JppL2056924@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by cperciva:

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

commit bd11e253a9a459c9a7b69ebb1c68f0162eb6119f
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2021-09-05 19:50:15 +0000
Commit:     Colin Percival <cperciva@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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109051951.185JppL2056924>