GSoC Project | Basic Support for Trace Compass

Ravindra Kumar Meena rmeena840 at gmail.com
Thu Jul 25 08:44:40 UTC 2019


>
> >     1. Gather the information from two record events
> >     (RTEMS_RECORD_THREAD_SWITCH_OUT and RTEMS_RECORD_THREAD_SWITCH_IN)
> with
> >     the same timestamp on the same CPU.
> >
> > A CPU can have many records events. Since RTEMS_RECORD_THREAD_SWITCH_IN
> > is received after RTEMS_RECORD_THREAD_SWITCH_OUT we can just directly
> > write into corresponding CPU file after receiving
> > RTEMS_RECORD_THREAD_SWITCH_IN for the same timestamp.
>
> Yes.
>
> All the record handling must be done per CPU.
>
> >
> >
> >     2. Once you gathered the information of two events that meet this
> >     criteria, you produce exactly one LTTNG sched_switch event.
> >
> >   Okay. So this particular lttng sched_switch will have prev_* value
> > as RTEMS_RECORD_THREAD_SWITCH_OUT data and next_* value
> > as RTEMS_RECORD_THREAD_SWITCH_IN.
>
> Yes.
>
Have made changes:

https://github.com/rmeena840/rtems-tools/commit/4048dfb7f5c49ba731e46946b51b12af95088109

Have a look

I have made code more easy to understand.

Babeltrace output:

babeltrace . | head

[19:16:31.180116542] (+?.?????????) Record_Item sched_switch: { cpu_id = 17
}, { prev_comm = "0a01002b", prev_tid = 167837739, prev_prio = 0,
prev_state = 0, next_comm = "09010014", next_tid = 151060500, next_prio = 0
}
[19:16:31.180154588] (+0.000038046) Record_Item sched_switch: { cpu_id = 17
}, { prev_comm = "09010014", prev_tid = 151060500, prev_prio = 0,
prev_state = 0, next_comm = "0a01002b", next_tid = 167837739, next_prio = 0
}
[19:16:31.180174232] (+0.000019644) Record_Item sched_switch: { cpu_id = 17
}, { prev_comm = "0a01002b", prev_tid = 167837739, prev_prio = 0,
prev_state = 0, next_comm = "09010014", next_tid = 151060500, next_prio = 0
}
[19:16:31.180223920] (+0.000049688) Record_Item sched_switch: { cpu_id = 5
}, { prev_comm = "09010015", prev_tid = 151060501, prev_prio = 0,
prev_state = 0, next_comm = "0a01002b", next_tid = 167837739, next_prio = 0
}
[19:16:31.180241405] (+0.000017485) Record_Item sched_switch: { cpu_id = 5
}, { prev_comm = "0a01002b", prev_tid = 167837739, prev_prio = 0,
prev_state = 0, next_comm = "09010015", next_tid = 151060501, next_prio = 0
}
[19:16:31.180281360] (+0.000039955) Record_Item sched_switch: { cpu_id = 5
}, { prev_comm = "09010015", prev_tid = 151060501, prev_prio = 0,
prev_state = 0, next_comm = "0a01002b", next_tid = 167837739, next_prio = 0
}
[19:16:31.180295428] (+0.000014068) Record_Item sched_switch: { cpu_id = 5
}, { prev_comm = "0a01002b", prev_tid = 167837739, prev_prio = 0,
prev_state = 0, next_comm = "09010015", next_tid = 151060501, next_prio = 0
}
[19:16:31.180348740] (+0.000053312) Record_Item sched_switch: { cpu_id = 5
}, { prev_comm = "09010015", prev_tid = 151060501, prev_prio = 0,
prev_state = 0, next_comm = "0a01002b", next_tid = 167837739, next_prio = 0
}
[19:16:31.180362596] (+0.000013856) Record_Item sched_switch: { cpu_id = 5
}, { prev_comm = "0a01002b", prev_tid = 167837739, prev_prio = 0,
prev_state = 0, next_comm = "09010015", next_tid = 151060501, next_prio = 0
}
[19:16:31.180397048] (+0.000034452) Record_Item sched_switch: { cpu_id = 5
}, { prev_comm = "09010015", prev_tid = 151060501, prev_prio = 0,
prev_state = 0, next_comm = "0a01002b", next_tid = 167837739, next_prio = 0
}

Both prev_* and next_* values are different.


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
<https://www.iitism.ac.in/>, Dhanbad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190725/a244df09/attachment-0002.html>


More information about the devel mailing list