diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-01-24 01:43:25 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-01-29 18:11:55 +0000 |
| commit | 610d7062c60b0f1f7c193e01c5238088b2b56c96 (patch) | |
| tree | f7c94bbb3283f8e87cb47abf5a4f1096c5f38ab0 | |
| parent | 8515934ce3c290765df9254003f3c6d79da7e538 (diff) | |
sched_4bsd: remove unused function sched_pctcpu_delta()
It is not used since c72188d85a793c7610208beafb83af544de6e3b7.
Noted by: jrtc27
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54831
| -rw-r--r-- | sys/kern/sched_4bsd.c | 34 | ||||
| -rw-r--r-- | sys/sys/sched.h | 5 |
2 files changed, 0 insertions, 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) |
