https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=718
Summary: Avoid meaningless thread/activity names
Product: RTT
Version: 1.10.1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Real-Time Toolkit (RTT)
AssignedTo: orocos-dev [..] ...
ReportedBy: klaas [dot] gadeyne [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
Created an attachment (id=523)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=523)
Set activity name the same as parent taskcontext to ease differencing between
threads
When debugging application, it's not very helpful if the logger outputs
something like
[kgad@ampere ~]$
cat debugging.txt
0.002 [ Info ][Thread] Creating Thread for scheduler: 0
0.003 [ Info ][Activity] Thread created with scheduler type '0', priority 0
and period 0.
0.004 [ Info ][Thread::setScheduler] Setting scheduler type for Thread
'Activity' to 1
0.004 [ Warning][Thread::setScheduler] Forcing priority (0) of thread with
!SCHED_OTHER policy to 1.
0.006 [ Info ][Thread] Creating Thread for scheduler: 0
0.006 [ Info ][Activity] Thread created with scheduler type '0', priority 0
and period 0.
0.007 [ Info ][Hello] Connected Port Port to peer Task Universe.
0.008 [ Info ][Thread] Creating Thread for scheduler: 0
0.009 [ Info ][Activity] Thread created with scheduler type '0', priority 0
and period 0.
0.010 [ Info ][Thread::setScheduler] Setting scheduler type for Thread
'Activity' to 1
I prefer
[kgad@ampere ~]$
cat debugging_after.txt
0.002 [ Info ][Thread] Creating Thread for scheduler: 0
0.003 [ Info ][Hello] Thread created with scheduler type '0', priority 0 and
period 0.
0.004 [ Info ][Thread::setScheduler] Setting scheduler type for Thread
'Hello' to 1
0.004 [ Warning][Thread::setScheduler] Forcing priority (0) of thread with
!SCHED_OTHER policy to 1.
0.005 [ Info ][Thread] Creating Thread for scheduler: 0
0.006 [ Info ][Universe] Thread created with scheduler type '0', priority 0
and period 0.
0.007 [ Info ][Hello] Connected Port Port to peer Task Universe.
0.008 [ Info ][Thread] Creating Thread for scheduler: 0
0.008 [ Info ][World] Thread created with scheduler type '0', priority 0 and
period 0.
0.009 [ Info ][Thread::setScheduler] Setting scheduler type for Thread
'World' to 1
Any objections?
[Bug 718] Avoid meaningless thread/activity names
https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=718
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution| |FIXED
Status|NEW |RESOLVED
--- Comment #2 from Peter Soetens <peter [..] ...> 2009-10-27 11:33:12 ---
(In reply to comment #0)
> Created an attachment (id=523)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=523)
> Set activity name the same as parent taskcontext to ease differencing between
> threads
>
> When debugging application, it's not very helpful if the logger outputs
> something like
>
> [kgad@ampere ~]$
> cat debugging.txt
> 0.002 [ Info ][Thread] Creating Thread for scheduler: 0
> 0.003 [ Info ][Activity] Thread created with scheduler type '0', priority 0
> and period 0.
> 0.004 [ Info ][Thread::setScheduler] Setting scheduler type for Thread
> 'Activity' to 1
> 0.004 [ Warning][Thread::setScheduler] Forcing priority (0) of thread with
> !SCHED_OTHER policy to 1.
> 0.006 [ Info ][Thread] Creating Thread for scheduler: 0
> 0.006 [ Info ][Activity] Thread created with scheduler type '0', priority 0
> and period 0.
> 0.007 [ Info ][Hello] Connected Port Port to peer Task Universe.
> 0.008 [ Info ][Thread] Creating Thread for scheduler: 0
> 0.009 [ Info ][Activity] Thread created with scheduler type '0', priority 0
> and period 0.
> 0.010 [ Info ][Thread::setScheduler] Setting scheduler type for Thread
> 'Activity' to 1
>
> I prefer
>
> [kgad@ampere ~]$
> cat debugging_after.txt
> 0.002 [ Info ][Thread] Creating Thread for scheduler: 0
> 0.003 [ Info ][Hello] Thread created with scheduler type '0', priority 0 and
> period 0.
> 0.004 [ Info ][Thread::setScheduler] Setting scheduler type for Thread 'Hello'
> to 1
> 0.004 [ Warning][Thread::setScheduler] Forcing priority (0) of thread with
> !SCHED_OTHER policy to 1.
> 0.005 [ Info ][Thread] Creating Thread for scheduler: 0
> 0.006 [ Info ][Universe] Thread created with scheduler type '0', priority 0
> and period 0.
> 0.007 [ Info ][Hello] Connected Port Port to peer Task Universe.
> 0.008 [ Info ][Thread] Creating Thread for scheduler: 0
> 0.008 [ Info ][World] Thread created with scheduler type '0', priority 0 and
> period 0.
> 0.009 [ Info ][Thread::setScheduler] Setting scheduler type for Thread 'World'
> to 1
>
> Any objections?
Patch applied and back-ported to rtt-1.10.
Peter
[Bug 718] Avoid meaningless thread/activity names
https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=718
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |peter [..] ...
--- Comment #1 from Peter Soetens <peter [..] ...> 2009-10-26 14:47:19 ---
(In reply to comment #0)
> Created an attachment (id=523)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=523) [details]
> Set activity name the same as parent taskcontext to ease differencing between
> threads
Strange, I even thought this was the case. Patch clearly welcome.
Peter