ktrace: Fix the build when options KTRACE is not configured

MFC after:	1 week
Reported by:	John Nielsen <lists@jnielsen.net>
This commit is contained in:
Mark Johnston 2024-03-09 00:11:01 -05:00
parent cce4979133
commit a58813fd70
2 changed files with 9 additions and 9 deletions

View file

@ -37,13 +37,13 @@
#include <sys/proc.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/ktrace.h>
#include <sys/condvar.h>
#include <sys/sched.h>
#include <sys/signalvar.h>
#include <sys/sleepqueue.h>
#include <sys/resourcevar.h>
#ifdef KTRACE
#include <sys/ktrace.h>
#include <sys/uio.h>
#include <sys/user.h>
#endif
@ -112,7 +112,7 @@ _cv_wait(struct cv *cvp, struct lock_object *lock)
char wmesg[WMESGLEN + 1];
#endif
struct lock_class *class;
struct thread *td;
struct thread *td __ktrace_used;
uintptr_t lock_state;
td = curthread;
@ -174,7 +174,7 @@ _cv_wait_unlock(struct cv *cvp, struct lock_object *lock)
char wmesg[WMESGLEN + 1];
#endif
struct lock_class *class;
struct thread *td;
struct thread *td __ktrace_used;
td = curthread;
CV_ASSERT(cvp, lock, td);
@ -232,7 +232,7 @@ _cv_wait_sig(struct cv *cvp, struct lock_object *lock)
char wmesg[WMESGLEN + 1];
#endif
struct lock_class *class;
struct thread *td;
struct thread *td __ktrace_used;
uintptr_t lock_state;
int rval;
@ -301,7 +301,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, sbintime_t sbt,
char wmesg[WMESGLEN + 1];
#endif
struct lock_class *class;
struct thread *td;
struct thread *td __ktrace_used;
int lock_state, rval;
td = curthread;
@ -371,7 +371,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock,
char wmesg[WMESGLEN + 1];
#endif
struct lock_class *class;
struct thread *td;
struct thread *td __ktrace_used;
int lock_state, rval;
td = curthread;

View file

@ -45,6 +45,7 @@
#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/ktrace.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
@ -60,7 +61,6 @@
#include <sys/vmmeter.h>
#ifdef KTRACE
#include <sys/uio.h>
#include <sys/ktrace.h>
#endif
#ifdef EPOCH_TRACE
#include <sys/epoch.h>
@ -131,7 +131,7 @@ int
_sleep(const void *ident, struct lock_object *lock, int priority,
const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags)
{
struct thread *td;
struct thread *td __ktrace_used;
struct lock_class *class;
uintptr_t lock_state;
int catch, pri, rval, sleepq_flags;
@ -238,7 +238,7 @@ int
msleep_spin_sbt(const void *ident, struct mtx *mtx, const char *wmesg,
sbintime_t sbt, sbintime_t pr, int flags)
{
struct thread *td;
struct thread *td __ktrace_used;
int rval;
WITNESS_SAVE_DECL(mtx);