All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [PATCH] separate queue debugging switch
Date: Tue, 14 Feb 2006 13:39:59 +0100	[thread overview]
Message-ID: <43F1CF9F.6020608@domain.hid> (raw)
In-Reply-To: <43F1C095.8030805@domain.hid>


[-- Attachment #1.1: Type: text/plain, Size: 448 bytes --]

Jan Kiszka wrote:
> 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.
> 

And this revision also takes care of 2.4.

Jan

[-- Attachment #1.2: DEBUG_QUEUE-v2.patch --]
[-- Type: text/plain, Size: 3425 bytes --]

Index: ksrc/nucleus/Kconfig
===================================================================
--- 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.
 
+config XENO_OPT_DEBUG_QUEUES
+	bool "Queue Debugging support"
+	depends on XENO_OPT_DEBUG
+	help
+	
+	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: ksrc/nucleus/Config.in
===================================================================
--- ksrc/nucleus/Config.in	(revision 564)
+++ ksrc/nucleus/Config.in	(working copy)
@@ -18,6 +18,9 @@
 	bool 'Interrupt shield support' CONFIG_XENO_OPT_ISHIELD
 	bool 'Statistics collection' CONFIG_XENO_OPT_STATS
 	bool 'Debug support' CONFIG_XENO_OPT_DEBUG
+	if [ "$CONFIG_XENO_OPT_DEBUG" = "y" ]; then
+		bool 'Queue Debugging support' CONFIG_XENO_OPT_DEBUG_QUEUES
+	fi
 	bool 'Watchdog support' CONFIG_XENO_OPT_WATCHDOG
 
 	bool 'Enable periodic timer support' CONFIG_XENO_OPT_TIMING_PERIODIC
Index: include/nucleus/queue.h
===================================================================
--- include/nucleus/queue.h	(revision 564)
+++ include/nucleus/queue.h	(working copy)
@@ -57,27 +57,27 @@
 
     xnholder_t head;
     int elems;
-#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG) && defined(CONFIG_SMP)
+#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG_QUEUES) && defined(CONFIG_SMP)
     xnlock_t lock;
-#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG && CONFIG_SMP */
+#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG_QUEUES && CONFIG_SMP */
 
 } xnqueue_t;
 
-#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 = { { &(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 = { { &(q).head, &(q).head }, 0 }
-#endif /* CONFIG_XENO_OPT_DEBUG && CONFIG_SMP */
+#endif /* CONFIG_XENO_OPT_DEBUG_QUEUES && CONFIG_SMP */
 
 static inline void initq (xnqueue_t *qslot) {
     inith(&qslot->head);
     qslot->elems = 0;
-#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG) && defined(CONFIG_SMP)
+#if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_DEBUG_QUEUES) && defined(CONFIG_SMP)
     xnlock_init(&qslot->lock);
-#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG && CONFIG_SMP */
+#endif /* __KERNEL__ && CONFIG_XENO_OPT_DEBUG_QUEUES && CONFIG_SMP */
 }
 
-#ifdef CONFIG_XENO_OPT_DEBUG
+#ifdef CONFIG_XENO_OPT_DEBUG_QUEUES
 
 #if defined(__KERNEL__) || defined(__XENO_UVM__) || defined(__XENO_SIM__)
 
@@ -172,7 +172,7 @@
    dth(__holder);				\
    --(__qslot)->elems; })
 
-#else /* !CONFIG_XENO_OPT_DEBUG */
+#else /* !CONFIG_XENO_OPT_DEBUG_QUEUES */
 
 static inline int insertq (xnqueue_t *qslot,
                            xnholder_t *head,
@@ -206,7 +206,7 @@
     return --qslot->elems;
 }
 
-#endif /* CONFIG_XENO_OPT_DEBUG */
+#endif /* CONFIG_XENO_OPT_DEBUG_QUEUES */
 
 static inline xnholder_t *getheadq (xnqueue_t *qslot)
 {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-02-14 12:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14 11:35 [Xenomai-core] [PATCH] separate queue debugging switch Jan Kiszka
2006-02-14 12:39 ` Jan Kiszka [this message]
2006-02-14 16:20   ` Gilles Chanteperdrix
2006-02-14 17:40 ` Philippe Gerum
2006-02-14 17:56   ` Jan Kiszka
2006-02-14 18:20     ` Philippe Gerum
2006-02-15  9:56       ` Jan Kiszka
2006-02-15 12:11         ` Philippe Gerum
2006-02-16  0:41           ` Jan Kiszka
2006-02-16 14:27             ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43F1CF9F.6020608@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.