ktrace: change AST handler to require AST flag set

When it was inline it made sense to depend on the existing nested check
in KTRUSERRET() rather than adding a new td_flags flag.  However, since
we now have a TDA_KTRACE flag anyway, we might as well check it and
avoid the call.

Suggested by:	jhb
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35888
This commit is contained in:
Konstantin Belousov 2022-07-28 09:32:47 +03:00
parent c46771a7b7
commit 4a662c9064

View File

@ -229,8 +229,7 @@ ktrace_init(void *dummy)
M_ZERO);
STAILQ_INSERT_HEAD(&ktr_free, req, ktr_list);
}
ast_register(TDA_KTRACE, ASTR_UNCOND, 0, ast_ktrace);
ast_register(TDA_KTRACE, ASTR_ASTF_REQUIRED, 0, ast_ktrace);
}
SYSINIT(ktrace_init, SI_SUB_KTRACE, SI_ORDER_ANY, ktrace_init, NULL);