git: a9f473632607 - stable/14 - loader: Add TSLOG to interpreter built-ins

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 29 Sep 2024 15:25:13 UTC
The branch stable/14 has been updated by cperciva:

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

commit a9f47363260761a4f90609dc54d115715c907db9
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2024-09-18 11:01:41 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-09-29 15:24:52 +0000

    loader: Add TSLOG to interpreter built-ins
    
    Wrap each call to a built-in command with TSENTER/TSEXIT to make
    it easier to see where time is going in the loader.
    
    MFC after:      1 week
    Sponsored by:   Amazon
    Differential Revision:  https://reviews.freebsd.org/D46630
    
    (cherry picked from commit 58ec2d0d4a3c3bcf741d9694dc7696c7b4e753b9)
---
 stand/common/interp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/stand/common/interp.c b/stand/common/interp.c
index c6ac01ea099b..ead7eb136879 100644
--- a/stand/common/interp.c
+++ b/stand/common/interp.c
@@ -189,7 +189,9 @@ interp_builtin_cmd(int argc, char *argv[])
 
 	cmd = interp_lookup_cmd(argv[0]);
 	if (cmd != NULL && cmd->c_fn) {
+		TSENTER2(argv[0]);
 		result = cmd->c_fn(argc, argv);
+		TSEXIT();
 	} else {
 		command_errmsg = "unknown command";
 	}