Date: Wed, 11 Feb 2026 05:17:14 +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: 90548e0a899f - stable/15 - sched_4bsd: remove unused function sched_pctcpu_delta() Message-ID: <698c10da.26644.1233d552@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=90548e0a899fdf37f4eb0964112efde0acd1638f commit 90548e0a899fdf37f4eb0964112efde0acd1638f Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-01-24 01:43:25 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-02-11 05:12:35 +0000 sched_4bsd: remove unused function sched_pctcpu_delta() (cherry picked from commit 610d7062c60b0f1f7c193e01c5238088b2b56c96) --- sys/kern/sched_4bsd.c | 34 ---------------------------------- sys/sys/sched.h | 5 ----- 2 files changed, 39 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index e40b5c6c6b7f..482d8884c248 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -1639,40 +1639,6 @@ sched_pctcpu(struct thread *td) return (ts->ts_pctcpu); } -#ifdef RACCT -/* - * Calculates the contribution to the thread cpu usage for the latest - * (unfinished) second. - */ -fixpt_t -sched_pctcpu_delta(struct thread *td) -{ - struct td_sched *ts; - fixpt_t delta; - int realstathz; - - THREAD_LOCK_ASSERT(td, MA_OWNED); - ts = td_get_sched(td); - delta = 0; - realstathz = stathz ? stathz : hz; - if (ts->ts_cpticks != 0) { -#if (FSHIFT >= CCPU_SHIFT) - delta = (realstathz == 100) - ? ((fixpt_t) ts->ts_cpticks) << - (FSHIFT - CCPU_SHIFT) : - 100 * (((fixpt_t) ts->ts_cpticks) - << (FSHIFT - CCPU_SHIFT)) / realstathz; -#else - delta = ((FSCALE - ccpu) * - (ts->ts_cpticks * - FSCALE / realstathz)) >> FSHIFT; -#endif - } - - return (delta); -} -#endif - u_int sched_estcpu(struct thread *td) { diff --git a/sys/sys/sched.h b/sys/sys/sched.h index f3a5d1eca874..635e8283561a 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -114,11 +114,6 @@ void sched_throw(struct thread *td); void sched_unlend_prio(struct thread *td, u_char prio); void sched_user_prio(struct thread *td, u_char prio); void sched_userret_slowpath(struct thread *td); -#ifdef RACCT -#ifdef SCHED_4BSD -fixpt_t sched_pctcpu_delta(struct thread *td); -#endif -#endif static inline void sched_userret(struct thread *td)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698c10da.26644.1233d552>
