Date: Wed, 11 Feb 2026 05:17:36 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 20f2249d3913 - stable/15 - kern/sched: deduplicate dtrace hook vars Message-ID: <698c10f0.26455.16420b90@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=20f2249d3913e8bd5fac979df475d5e789591803 commit 20f2249d3913e8bd5fac979df475d5e789591803 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-01-24 06:22:01 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-02-11 05:12:37 +0000 kern/sched: deduplicate dtrace hook vars (cherry picked from commit 783b8a0fd880255a8315db7f59d0450bd7276f4d) --- sys/kern/sched_4bsd.c | 6 ------ sys/kern/sched_shim.c | 6 ++++++ sys/kern/sched_ule.c | 6 ------ sys/sys/sched.h | 6 ++++++ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 57d6f87a4dce..317b47da2cca 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -66,12 +66,6 @@ #include <dev/hwt/hwt_hook.h> #endif -#ifdef KDTRACE_HOOKS -#include <sys/dtrace_bsd.h> -int __read_mostly dtrace_vtime_active; -dtrace_vtime_switch_func_t dtrace_vtime_switch_func; -#endif - /* * INVERSE_ESTCPU_WEIGHT is only suitable for statclock() frequencies in * the range 100-256 Hz (approximately). diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c index 4f000d8ace0c..ec5c42c37aab 100644 --- a/sys/kern/sched_shim.c +++ b/sys/kern/sched_shim.c @@ -120,6 +120,12 @@ SDT_PROBE_DEFINE(sched, , , remain__cpu); SDT_PROBE_DEFINE2(sched, , , surrender, "struct thread *", "struct proc *"); +#ifdef KDTRACE_HOOKS +#include <sys/dtrace_bsd.h> +int __read_mostly dtrace_vtime_active; +dtrace_vtime_switch_func_t dtrace_vtime_switch_func; +#endif + static char sched_name[32] = "ULE"; SET_DECLARE(sched_instance_set, struct sched_selection); diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 33a578814e0e..ccad7947c4f5 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -72,12 +72,6 @@ #include <dev/hwt/hwt_hook.h> #endif -#ifdef KDTRACE_HOOKS -#include <sys/dtrace_bsd.h> -int __read_mostly dtrace_vtime_active; -dtrace_vtime_switch_func_t dtrace_vtime_switch_func; -#endif - #include <machine/cpu.h> #include <machine/smp.h> diff --git a/sys/sys/sched.h b/sys/sys/sched.h index e4bd5211c1ae..08d8636aaa68 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -245,6 +245,12 @@ SDT_PROBE_DECLARE(sched, , , on__cpu); SDT_PROBE_DECLARE(sched, , , remain__cpu); SDT_PROBE_DECLARE(sched, , , surrender); +#ifdef KDTRACE_HOOKS +#include <sys/dtrace_bsd.h> +extern int dtrace_vtime_active; +extern dtrace_vtime_switch_func_t dtrace_vtime_switch_func; +#endif + /* * Fixup scheduler state for proc0 and thread0 */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698c10f0.26455.16420b90>
