Skip to contentSkip to conversation

Jan Kiszka : RTDM: Split up application and driver debugging

Xenomai-core Gilles Chanteperdrix 2 participants 3 messages Feb 4, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 45 lines · GIT version control
Module: xenomai-jki
Branch: for-upstream
Commit: 134378c9ff2bc597aaa908564323afb744cbbf01
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=134378c9ff2bc597aaa908564323afb744cbbf01
Author: Jan Kiszka <[email protected]>
Date:   Thu Feb  4 17:55:36 2010 +0100

RTDM: Split up application and driver debugging

There are use cases where you prefer to leave driver-level debugging checks on while preventing that user space can flood the log via unclean terminations. Split up the RTDM debug switch to reflect this.

---

 ksrc/skins/rtdm/Kconfig |    9 +++++++++
 ksrc/skins/rtdm/core.c  |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)
ksrc/skins/rtdm/Kconfig +9 -0
index 5eeb2f3..f0741d6 100644
@@ -55,4 +55,13 @@ config XENO_OPT_DEBUG_RTDM
 	It is a recommended option for analysing potential issues in RTDM
 	drivers. A minor runtime overhead is added.
 
+config XENO_OPT_DEBUG_RTDM_APPL
+	bool "RTDM application debugging support"
+	depends on XENO_OPT_DEBUG
+	default y
+	help
+
+	When enabled, this option makes the RTDM skin warn about
+	auto-clean operations executed upon application termination.
+
 endif
ksrc/skins/rtdm/core.c +0 -0
index bc3dccc..3bc13f1 100644

ksrc/skins/rtdm/core.c void cleanup_owned_contexts(void *owner) · line 401

Quoted 7 lines
ksrc/skins/rtdm/core.c +1 -1
@@ -396,7 +396,7 @@ void cleanup_owned_contexts(void *owner)
 		xnlock_put_irqrestore(&rt_fildes_lock, s);
 
 		if (context) {
-			if (XENO_DEBUG(RTDM))
+			if (XENO_DEBUG(RTDM_APPL))
 				xnprintf("RTDM: closing file descriptor %d.\n",
 					 fd);

Are you sure you are not missing a hunk like this ? #ifndef CONFIG_XENO_OPT_DEBUG_RTDM_APPL
#define CONFIG_XENO_OPT_DEBUG_RTDM_APPL 0
#endif /* CONFIG_XENO_OPT_DEBUG_RTDM_APPL */

Signature · 1 line
					    Gilles.
#2 lore raw
Quoted 48 lines · Gilles Chanteperdrix
Quoted 47 lines · GIT version control
Module: xenomai-jki
Branch: for-upstream
Commit: 134378c9ff2bc597aaa908564323afb744cbbf01
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=134378c9ff2bc597aaa908564323afb744cbbf01
Author: Jan Kiszka <[email protected]>
Date:   Thu Feb  4 17:55:36 2010 +0100

RTDM: Split up application and driver debugging

There are use cases where you prefer to leave driver-level debugging checks on while preventing that user space can flood the log via unclean terminations. Split up the RTDM debug switch to reflect this.

---

 ksrc/skins/rtdm/Kconfig |    9 +++++++++
 ksrc/skins/rtdm/core.c  |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)
ksrc/skins/rtdm/Kconfig +9 -0
index 5eeb2f3..f0741d6 100644
@@ -55,4 +55,13 @@ config XENO_OPT_DEBUG_RTDM
 	It is a recommended option for analysing potential issues in RTDM
 	drivers. A minor runtime overhead is added.
 
+config XENO_OPT_DEBUG_RTDM_APPL
+	bool "RTDM application debugging support"
+	depends on XENO_OPT_DEBUG
+	default y
+	help
+
+	When enabled, this option makes the RTDM skin warn about
+	auto-clean operations executed upon application termination.
+
 endif
ksrc/skins/rtdm/core.c +0 -0
index bc3dccc..3bc13f1 100644
@@ -396,7 +396,7 @@ void cleanup_owned_contexts(void *owner)
 		xnlock_put_irqrestore(&rt_fildes_lock, s);
 
Quoted 11 lines

ksrc/skins/rtdm/core.c void cleanup_owned_contexts(void *owner) · line 401

Quoted 5 lines
ksrc/skins/rtdm/core.c +1 -1
 		if (context) {
-			if (XENO_DEBUG(RTDM))
+			if (XENO_DEBUG(RTDM_APPL))
 				xnprintf("RTDM: closing file descriptor %d.\n",
 					 fd);

Are you sure you are not missing a hunk like this ? #ifndef CONFIG_XENO_OPT_DEBUG_RTDM_APPL
#define CONFIG_XENO_OPT_DEBUG_RTDM_APPL 0
#endif /* CONFIG_XENO_OPT_DEBUG_RTDM_APPL */

Of course - I wonder who designed this... :)

Just pushed v2.

Thanks,
Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#3 lore raw
Quoted 60 lines · Jan Kiszka
Quoted 48 lines · Gilles Chanteperdrix
Quoted 47 lines · GIT version control
Module: xenomai-jki
Branch: for-upstream
Commit: 134378c9ff2bc597aaa908564323afb744cbbf01
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=134378c9ff2bc597aaa908564323afb744cbbf01
Author: Jan Kiszka <[email protected]>
Date:   Thu Feb  4 17:55:36 2010 +0100

RTDM: Split up application and driver debugging

There are use cases where you prefer to leave driver-level debugging checks on while preventing that user space can flood the log via unclean terminations. Split up the RTDM debug switch to reflect this.

---

 ksrc/skins/rtdm/Kconfig |    9 +++++++++
 ksrc/skins/rtdm/core.c  |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)
ksrc/skins/rtdm/Kconfig +9 -0
index 5eeb2f3..f0741d6 100644
@@ -55,4 +55,13 @@ config XENO_OPT_DEBUG_RTDM
 	It is a recommended option for analysing potential issues in RTDM
 	drivers. A minor runtime overhead is added.
 
+config XENO_OPT_DEBUG_RTDM_APPL
+	bool "RTDM application debugging support"
+	depends on XENO_OPT_DEBUG
+	default y
+	help
+
+	When enabled, this option makes the RTDM skin warn about
+	auto-clean operations executed upon application termination.
+
 endif
ksrc/skins/rtdm/core.c +0 -0
index bc3dccc..3bc13f1 100644
@@ -396,7 +396,7 @@ void cleanup_owned_contexts(void *owner)
 		xnlock_put_irqrestore(&rt_fildes_lock, s);
 
Quoted 10 lines

ksrc/skins/rtdm/core.c void cleanup_owned_contexts(void *owner) · line 401

Quoted 5 lines
ksrc/skins/rtdm/core.c +1 -1
 		if (context) {
-			if (XENO_DEBUG(RTDM))
+			if (XENO_DEBUG(RTDM_APPL))
 				xnprintf("RTDM: closing file descriptor %d.\n",
 					 fd);

Are you sure you are not missing a hunk like this ? #ifndef CONFIG_XENO_OPT_DEBUG_RTDM_APPL
#define CONFIG_XENO_OPT_DEBUG_RTDM_APPL 0
#endif /* CONFIG_XENO_OPT_DEBUG_RTDM_APPL */

Quoted 3 lines

Of course - I wonder who designed this... :)

Just pushed v2.

Merged. Thanks.

Signature · 1 line
					    Gilles.