Suggestions for the vxWorks skins
Hi
As I am trying to debug startup failures of a thirs party C++-library, I stumbled about the fact that the /proc/xenomai/registry/ only listed semaphores and not tasks.
My co-workers would appreciate to have some equivalents to vxWorks "i" or "semShow" routines, as they come often very handy to debug problems, I was thinking about how to improve the situation.
One approach could be:
a) Instead of calling semShow for each semaphore
do "cat /proc/xenomai/registry/semaphores/*". The information therein is already useful. The attached patch only modifies the output to include the name of the semaphore. In the future it would be nice to show also the owner of a mutex.
b) The "i" procedure of vxworks could be replaced
by "cat /proc/xenomai/registry/tasks/*".
With the attached patch I just show the name of the task.
If nobody opposes I would like to extend the interface to provide at least the same information as under vxWorks (entrypoint, priority, status, program counter, errno, delay).
Would it be difficult/desirable to include the amount of free stack space? Would it be difficult/desirable to include the name of the vxworks semaphores a vx task is holding? Together with point a) one could easyly detect lock ups.
Best regards
Signature · 1 line
Niklaus Giger
skins/vxworks/semLib.c +1 -1
@@ -49,7 +49,7 @@xnlock_get_irqsave (&nklock, s); - p +=sprintf (p,"type=%s:value=%u\n" , sem->vtbl->type, sem->count); + p +=sprintf (p,"%s:type=%s:value=%u\n" , sem->name, sem->vtbl->type, sem->count);if (xnsynch_nsleepers (&sem->synchbase) ==0 ) {xnpholder_t *holder;
skins/vxworks/taskLib.c +51 -1
64 lines not on this page · raw message
Quoted 6 lines · Niklaus Giger
Hi
As I am trying to debug startup failures of a thirs party C++-library, I stumbled about the fact that the
/proc/xenomai/registry/only listed semaphores and not tasks.
Actually, the lack of task information under the registry tree is historically due to the existence of /proc/xenomai/{sched,stat}. This said, I agree that this would also make sense to provide task-related entries into the registry, since some task attributes one would want to know about are skin-specific, and could not be exported as part of the generic information available from the sched/stat entries.
Quoted 11 lines
My co-workers would appreciate to have some equivalents to vxWorks "i" or "semShow" routines, as they come often very handy to debug problems, I was thinking about how to improve the situation.
One approach could be:
a) Instead of calling semShow for each semaphore
do "cat/proc/xenomai/registry/semaphores/*". The information therein is already useful. The attached patch only modifies the output to include the name of the semaphore. In the future it would be nice to show also the owner of a mutex.
Quoted 2 lines
b) The "i" procedure of vxworks could be replaced
by "cat/proc/xenomai/registry/tasks/*".
Likely /proc/xenomai/registry/vxworks/tasks/*.
Quoted 7 lines
With the attached patch I just show the name of the task.
If nobody opposes I would like to extend the interface to provide at least the same information as under vxWorks (entrypoint, priority, status, program counter, errno, delay).
I would definitely merge that. Xenomai is very much about helping traditional RTOS users to move smoothly to Linux, so this feature would likely be desirable.
Quoted 1 line
Would it be difficult/desirable to include the amount of free stack space?
Not difficult, but the problem I'd see, is that an application usually crashes before one manage to ask for this information to be displayed. IOW, you would be already toast before the information gives you any value.
Quoted 3 lines
Would it be difficult/desirable to include the name of the vxworks semaphores a vx task is holding? Together with point a) one could easyly detect lock ups.
Mm, depends on the overhead tracking them safely.
Quoted 7 lines
Best regards
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.
Quoted 6 lines · Philippe Gerum
Quoted 3 lines · Niklaus Giger
Would it be difficult/desirable to include the name of the vxworks semaphores a vx task is holding? Together with point a) one could easyly detect lock ups.
Mm, depends on the overhead tracking them safely.
This sounds like robust locks, rather a generic feature interesting for all skins. As an optional feature of the nucleus, I would say this is quite desirable.
I pushed it to our new to-do list [1] to save it for now. If anyone has ideas about how to design this, he could create a new wiki page and write the concept down - our write the patch directly...
Jan