[Bug 1016] New: Add a setName function for tasks.

http://bugs.orocos.org/show_bug.cgi?id=1016

Summary: Add a setName function for tasks.
Product: Toolchain
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: paul [dot] chavent [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created attachment 843
--> http://bugs.orocos.org/attachment.cgi?id=843
add the setName method

Hi.

It seems that with the recent addition of get/set Pid/Tid, the sources prepares
to host some new tracing/monitoring code.

I would like to submit a draft of patches that add a setName function to tasks.

- 0003-Thread-add-setName-method.patch add the setName method.
- 0004-Thread-fosi_internal-clean-free-of-names-and-zeroing.patch fix a
potential memory leak in rtt/os/xenomai/fosi_internal.cpp that do not free
mytask->name
- 0005-Thread-add-prctl-commented.patch suggest to use prctl(PR_SET_NAME, ...)
to set the tid name (it can be useful to have a comprehensive output of pstree
for instance, and some tracing tools automatically use this name).

The last patch is a draft and subject to debate. I would like to ask you :
- do you think it could be possible to append to the task name the runnable
objects that it run ? Indeed, several TaskContexts can be run by the same os
task... so, it's hard to see where is our TaskContext at the first sight...
- do you think that we could add an option to exactly map one TaskContext to
one thread ? Do you know the performance penalty (far more context switching i
assume) ?
- is there someone that know equivalent calls of PR_SET_NAME on ither
platforms, and if it exists some calls that can take a pid id as argument ?

Thank for your reading.

Cheers.

Paul.

[Bug 1016] Add a setName function for tasks.

http://bugs.orocos.org/show_bug.cgi?id=1016

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |peter [..] ...

[Bug 1016] Add a setName function for tasks.

http://bugs.orocos.org/show_bug.cgi?id=1016

Chavent Paul <paul [dot] chavent [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #844 is|0 |1
obsolete| |

[Bug 1016] Add a setName function for tasks.

http://bugs.orocos.org/show_bug.cgi?id=1016

Chavent Paul <paul [dot] chavent [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #843 is|0 |1
obsolete| |
Attachment #845 is|0 |1
obsolete| |

[Bug 1016] Add a setName function for tasks.

[Bug 1016] Add a setName function for tasks.