GSoC Project | Basic Support for Trace Compass

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jul 31 05:30:57 UTC 2019


On 30/07/2019 18:32, Ravindra Kumar Meena wrote:
>      >     The next tasks are:
>      >
>      >     1. Detect if we switch to/from an idle thread. In this case
>     set the
>      >     corresponding state to TASK_IDLE == 1026.
>      >
>      > I tried to work on this task. I am not sure how to detect it without
>      > calling pthread_*.
>      > Does this have to do something with rtems_task_is_suspended?
>      >
>     https://docs.rtems.org/branches/master/c-user/task_manager.html#rtems-task-is-suspended
> 
>     On the host you cannot call any RTEMS functions on the target. All
>     information you have is in the record items. For a start, you can
>     identify the idle threads via the identifier API:
> 
>     https://docs.rtems.org/branches/master/c-user/key_concepts.html#object-ids
> 
>     The API value for idle threads is 1.
> 
> Have made changes in metadata to sync with RTEMS:
> https://github.com/rmeena840/rtems-tools/commit/4bc050227dd3055af99bd73b667015a620c259d4

Since this enum is not defined by LTTNG, we should remove it.

> 
> Have added the prev_state in client-side:
> https://github.com/rmeena840/rtems-tools/commit/43ae797ba3c6123cc51a6244a62912c999f69a1e

The bit field is documented in the manual. I would simplify this to:

cctx->switch_out_int[ item->cpu ].prev_state = ( ( ( item->data >> 24 ) 
& 0x7 ) == 1 ) ? TASK_IDLE : TASK_RUNNING;

> 
> Have a look
> 
> 
>      >
>      >
>      >     2. The program should learn the thread names corresponding to
>     a thread
>      >     identifier. Build up a thread identifier to thread name map.
>     Use the
>      >     map
>      >     to emit thread names in the sched_switch event.
>      >
>      > Mapping should be like this:
>      > [thread_id]->[thread_name] or [thread_name]->[thread_id]?
> 
>     In the RTEMS_RECORD_THREAD_SWITCH_OUT and RTEMS_RECORD_THREAD_SWITCH_IN
>     record events you have the thread id. So, the mapping must be
>     [thread_id]->[thread_name].
> 
>      >
>      > the thread name can be obtained by:
>      > rtems_record_event_text( item->event )
>      >
>      >
>      >     You can use C++ if this makes it easier for you.
>      >
>      > I will have to create separate c++ file for this.
> 
>     Please convert the entire record-main.c file to C++.
> 
> Okay. I will work on it after the previous task.

Did the previous task keep you busy for 8 hours?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list