Suppress switch warnings while debugging
PATCH 1/1 Suppress switch warnings while debugging
Don't raise SIGXCPU while the process is being debugged. These mode changes are expected, and reporting them doesn't provide any helpful information to the application. Rather, it may raise error storms on the application side.
---
ksrc/nucleus/shadow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
ksrc/nucleus/shadow.c +2 -1
@@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)xnstat_counter_inc (&thread->stat.ssw);/* Account for secondary mode switch. */ -if (notify &&xnthread_test_state (thread,XNTRAPSW )) +if (notify &&xnthread_test_state (thread,XNTRAPSW ) && + !xnthread_test_state (thread,XNDEBUG ))/* Help debugging spurious relaxes. */ send_sig (SIGXCPU , current,1 );
Quoted 16 lines · Jan Kiszka
Don't raise SIGXCPU while the process is being debugged. These mode changes are expected, and reporting them doesn't provide any helpful information to the application. Rather, it may raise error storms on the application side.
Signed-off-by Jan Kiszka <[email protected]>---
ksrc/nucleus/shadow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)ksrc/nucleus/shadow.c +0
-0
ksrc/nucleus/shadow.c void xnshadow_relax(int notify) · line 1089
Quoted 9 lines
ksrc/nucleus/shadow.c +2
-1@@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)xnstat_counter_inc (&thread->stat.ssw);/* Account for secondary mode switch. */ -if (notify &&xnthread_test_state (thread,XNTRAPSW )) +if (notify &&xnthread_test_state (thread,XNTRAPSW ) && + !xnthread_test_state (thread,XNDEBUG ))/* Help debugging spurious relaxes. */ send_sig (SIGXCPU , current,1 );
I would rather identify the source of the switch and clear the notify flag appropriately from the relax call site.
Quoted 6 lines
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · Jan Kiszka
Don't raise SIGXCPU while the process is being debugged. These mode changes are expected, and reporting them doesn't provide any helpful information to the application. Rather, it may raise error storms on the application side.
Signed-off-by Jan Kiszka <[email protected]>---
ksrc/nucleus/shadow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)ksrc/nucleus/shadow.c +0
-0@@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)xnstat_counter_inc (&thread->stat.ssw);/* Account for secondary mode switch. */
Quoted 9 lines
ksrc/nucleus/shadow.c void xnshadow_relax(int notify) · line 1088
Quoted 6 lines
ksrc/nucleus/shadow.c +2
-1-if (notify &&xnthread_test_state (thread,XNTRAPSW )) +if (notify &&xnthread_test_state (thread,XNTRAPSW ) && + !xnthread_test_state (thread,XNDEBUG ))/* Help debugging spurious relaxes. */ send_sig (SIGXCPU , current,1 );I would rather identify the source of the switch and clear the notify flag appropriately from the relax call site.
Sorry, don't get this: What flag do you want to clear? XNTRAPSW?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
Quoted 31 lines · Jan Kiszka
Quoted 21 lines · Philippe Gerum
Quoted 20 lines · Jan Kiszka
Don't raise SIGXCPU while the process is being debugged. These mode changes are expected, and reporting them doesn't provide any helpful information to the application. Rather, it may raise error storms on the application side.
Signed-off-by Jan Kiszka <[email protected]>---
ksrc/nucleus/shadow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)ksrc/nucleus/shadow.c +0
-0@@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)xnstat_counter_inc (&thread->stat.ssw);/* Account for secondary mode switch. */
Quoted 8 lines
ksrc/nucleus/shadow.c void xnshadow_relax(int notify) · line 1088
Quoted 6 lines
ksrc/nucleus/shadow.c +2
-1-if (notify &&xnthread_test_state (thread,XNTRAPSW )) +if (notify &&xnthread_test_state (thread,XNTRAPSW ) && + !xnthread_test_state (thread,XNDEBUG ))/* Help debugging spurious relaxes. */ send_sig (SIGXCPU , current,1 );I would rather identify the source of the switch and clear the notify flag appropriately from the relax call site.
Quoted 2 lines
Sorry, don't get this: What flag do you want to clear? XNTRAPSW?
The "notify" parameter should set by the call site to tell xnshadow_relax() whether we want the SIGXCPU signal to be sent or not. I would rather identify which call site introduces the issue, and fix the notify parameter accordingly. Did you track the issue down to request_syscall_restart() for instance? In which case, we should rather test XNDEBUG there, and set the notify flag passed to xnshadow_relax() appropriately.
Quoted 2 lines
Jan
Signature · 1 line
Philippe.
Quoted 36 lines · Philippe Gerum
Quoted 32 lines · Jan Kiszka
Quoted 22 lines · Philippe Gerum
Quoted 21 lines · Jan Kiszka
Don't raise SIGXCPU while the process is being debugged. These mode changes are expected, and reporting them doesn't provide any helpful information to the application. Rather, it may raise error storms on the
application side.Signed-off-by Jan Kiszka <[email protected]>---
ksrc/nucleus/shadow.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)ksrc/nucleus/shadow.c +0
-0@@ -1082,7 +1082,8 @@ void xnshadow_relax(int notify)xnstat_counter_inc (&thread->stat.ssw);/* Account for secondary mode switch. */
Quoted 8 lines
ksrc/nucleus/shadow.c void xnshadow_relax(int notify) · line 1088
Quoted 6 lines
ksrc/nucleus/shadow.c +2
-1-if (notify &&xnthread_test_state (thread,XNTRAPSW )) +if (notify &&xnthread_test_state (thread,XNTRAPSW ) && + !xnthread_test_state (thread,XNDEBUG ))/* Help debugging spurious relaxes. */ send_sig (SIGXCPU , current,1 );I would rather identify the source of the switch and clear the notify flag appropriately from the relax call site.
Quoted 2 lines
Sorry, don't get this: What flag do you want to clear? XNTRAPSW?
Quoted 7 lines
The "notify" parameter should set by the call site to tell
xnshadow_relax()whether we want the SIGXCPU signal to be sent or not. I would rather identify which call site introduces the issue, and fix the notify parameter accordingly. Did you track the issue down torequest_syscall_restart()for instance? In which case, we should rather test XNDEBUG there, and set the notify flag passed toxnshadow_relax()appropriately.
OK, now I understand. I didn't track this down yet, but it must be request_syscall_restart, because that should be the only site that relaxes due to pending signals. Will update the patch.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
PATCH v2 1/1 Suppress switch warnings while debugging
In reply to Jan KiszkaDon't raise SIGXCPU while the process is being debugged. These mode changes are expected, and reporting them doesn't provide any helpful information to the application. Rather, it may raise error storms on the application side.
---
ksrc/nucleus/shadow.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
ksrc/nucleus/shadow.c +1 -1
@@ -667,7 +667,7 @@ static inline void request_syscall_restart(xnthread_t *thread,__xn_error_return (regs, (sysflags & __xn_exec_norestart) ? -ERESTARTNOHAND : -ERESTARTSYS ); - notify =1 ; + notify = !xnthread_test_state (thread,XNDEBUG ); }xnthread_clear_info (thread,XNKICKED );