GSoC Project | Basic Support for Trace Compass
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jul 24 05:55:32 UTC 2019
On 24/07/2019 07:47, Ravindra Kumar Meena wrote:
> This makes no sense:
>
> static void print_item( client_context *cctx, const client_item *item )
> {
> if( cctx->event_counter % 2 == 0 ){
>
> 1. event_counter is not per CPU.
>
> 2. You don't care about the record event. You have to do this for
> specific events as I already wrote in the description of this task.
>
>
> I forgot to remove the modular operator.
>
> https://github.com/rmeena840/rtems-tools/commit/c278c48abab1d5ea93cf36823bd24af07633f35f
>
> The logic behind this is that when the first time program enters in
> print_item() it initializes the
> prev_* values and after this, it will enter in else part recursively
> initializing prev_* and next_* values for the same CPU and write it in
> the file.
This approach makes no sense to me.
Per CPU you receive three record events in succession:
[19:32:26.679099590] (+0.000046608) Record_Item RTEMS_RECORDING_EVENT: {
cpu_id = 5 }, { event = ( "RTEMS_RECORD_THREAD_SWITCH_OUT" : container =
216 ), data = 167837707 }
[19:32:26.679099590] (+0.000000000) Record_Item RTEMS_RECORDING_EVENT: {
cpu_id = 5 }, { event = ( "RTEMS_RECORD_THREAD_STACK_CURRENT" :
container = 209 ), data = 32320 }
[19:32:26.679099590] (+0.000000000) Record_Item RTEMS_RECORDING_EVENT: {
cpu_id = 5 }, { event = ( "RTEMS_RECORD_THREAD_SWITCH_IN" : container =
215 ), data = 151060501 }
They have all the same timestamp.
When you receive an RTEMS_RECORD_THREAD_SWITCH_OUT event, you store the
timestamp (per CPU) and the data (per-CPU, this is the thread ID).
When you receive an RTEMS_RECORD_THREAD_SWITCH_IN event and the
timestamp matches, you use the values of the current event and the
values stored before to output an LTTNG sched_switch event.
--
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