From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <43F1C095.8030805@domain.hid> Date: Tue, 14 Feb 2006 12:35:49 +0100 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFBAEE4805D64635B05011302" Sender: jan.kiszka@domain.hid Subject: [Xenomai-core] [PATCH] separate queue debugging switch List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai-core This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFBAEE4805D64635B05011302 Content-Type: multipart/mixed; boundary="------------010503010901040801020107" This is a multi-part message in MIME format. --------------010503010901040801020107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, while XENO_OPT_DEBUG is generally a useful switch for tracing potential issues in the core and the skins, it also introduces high latencies via the queue debugging feature (due to checks iterating over whole queues). This patch introduces separate control over queue debugging so that you can have debug checks without too dramatic slowdowns. Jan --------------010503010901040801020107 Content-Type: text/plain; name="DEBUG_QUEUES.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="DEBUG_QUEUES.patch" Index: ksrc/nucleus/Kconfig =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- ksrc/nucleus/Kconfig (revision 564) +++ ksrc/nucleus/Kconfig (working copy) @@ -87,6 +87,15 @@ Do not switch this option on unless you really know what you are doing. =20 +config XENO_OPT_DEBUG_QUEUES + bool "Queue Debugging support" + depends on XENO_OPT_DEBUG + help +=09 + This option activates debugging checks for all queueing + operations of the Xenomai core. It adds even more runtime + overhead then CONFIG_XENO_OPT_DEBUG, use with care. + config XENO_OPT_WATCHDOG bool "Watchdog support" default n Index: include/nucleus/queue.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- include/nucleus/queue.h (revision 564) +++ include/nucleus/queue.h (working copy) @@ -57,27 +57,27 @@ =20 xnholder_t head; int elems; -#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG) && defined(CON= FIG_SMP) +#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG_QUEUES) && defi= ned(CONFIG_SMP) xnlock_t lock; -#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG && CONFIG_SMP */ +#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG_QUEUES && CONFIG_SMP */ =20 } xnqueue_t; =20 -#if defined(CONFIG_XENO_OPT_DEBUG) && defined(CONFIG_SMP) +#if defined(CONFIG_XENO_OPT_DEBUG_QUEUES) && defined(CONFIG_SMP) #define DECLARE_XNQUEUE(q) xnqueue_t q =3D { { &(q).head, &(q).head }, 0= , XNARCH_LOCK_UNLOCKED } -#else /* !(CONFIG_XENO_OPT_DEBUG && CONFIG_SMP) */ +#else /* !(CONFIG_XENO_OPT_DEBUG_QUEUES && CONFIG_SMP) */ #define DECLARE_XNQUEUE(q) xnqueue_t q =3D { { &(q).head, &(q).head }, 0= } -#endif /* CONFIG_XENO_OPT_DEBUG && CONFIG_SMP */ +#endif /* CONFIG_XENO_OPT_DEBUG_QUEUES && CONFIG_SMP */ =20 static inline void initq (xnqueue_t *qslot) { inith(&qslot->head); qslot->elems =3D 0; -#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG) && defined(CON= FIG_SMP) +#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG_QUEUES) && defi= ned(CONFIG_SMP) xnlock_init(&qslot->lock); -#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG && CONFIG_SMP */ +#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG_QUEUES && CONFIG_SMP */ } =20 -#ifdef CONFIG_XENO_OPT_DEBUG +#ifdef CONFIG_XENO_OPT_DEBUG_QUEUES =20 #if defined(__KERNEL__) || defined(__XENO_UVM__) || defined(__XENO_SIM__= ) =20 @@ -172,7 +172,7 @@ dth(__holder); \ --(__qslot)->elems; }) =20 -#else /* !CONFIG_XENO_OPT_DEBUG */ +#else /* !CONFIG_XENO_OPT_DEBUG_QUEUES */ =20 static inline int insertq (xnqueue_t *qslot, xnholder_t *head, @@ -206,7 +206,7 @@ return --qslot->elems; } =20 -#endif /* CONFIG_XENO_OPT_DEBUG */ +#endif /* CONFIG_XENO_OPT_DEBUG_QUEUES */ =20 static inline xnholder_t *getheadq (xnqueue_t *qslot) { --------------010503010901040801020107-- --------------enigFBAEE4805D64635B05011302 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD8cCVniDOoMHTA+kRAvY7AJ9nLj7FhvR861tGf6S7KCcmmUTSsQCfXzNF O9HZK6QlVj9E0bjNkEeniO0= =icVu -----END PGP SIGNATURE----- --------------enigFBAEE4805D64635B05011302--