GSoC Project | Basic Support for Trace Compass

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jul 19 05:06:09 UTC 2019


On 19/07/2019 06:08, Ravindra Kumar Meena wrote:
> Hi,
> 
> I had a look at the variant examples documented here 
> https://diamon.org/ctf/#ex-variants. The examples explain how variant 
> work. First, it takes the id and on the basis of id passed it selects 
> the struct(compact, extended) present in variant data-type.
> 
> If id passed to the variant is in the range is [0,30] then variant 
> selects compact struct and if id=31 is passed to the variant then 
> extended struct is selected.
> 
> Since our recording timestamp is of 64 bit. So we have to pass 31 in 
> enum id. Our recording final event.header in binary stream file will 
> look this:
> 
> <enum_id=31> <event_id=0> <64-bit timestamp>
> 
> https://github.com/rmeena840/rtems-tools/commit/da100caecda9c69a08f73edbe849fad022fe1384
> 
> It was not previously before because I forgot to add event.header size 
> in both content_size and packet_size.
> 
> I tested the babeltrace output with/without event_header_compact. The 
> babeltrace is printing the same output.
> 
> [19:32:26.679052982] (+0.000000000) Record_Item RTEMS_RECORDING_EVENT: { 
> cpu_id = 18 }, { event = ( "RTEMS_RECORD_THREAD_SWITCH_IN" : container = 
> 215 ), data = 167837739 }
> [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 }
> 
> I have also added the env object in the metadata. Please check it's 
> member value if they are up to the requirement of rtems.
> 
> https://github.com/rmeena840/rtems-tools/commit/96b082a6a31a1ebf6ea05b475a7e6c8378e456e7
> 
> Have a look

This looks very nice.

The next step is to translate the record items into corresponding events 
of LTTNG. We should start with the following event which I guess is used 
by Trace Compass for the task switch view. I don't know it, we have to 
try it out. We can also look at the analyses package from LTTNG instead 
of Trace Compass:

https://github.com/lttng/lttng-analyses

event {
	name = "sched_switch";
	id = 22;
	stream_id = 0;
	fields := struct {
		integer { size = 8; align = 8; signed = 0; encoding = UTF8; base = 10; 
} _prev_comm[16];
		integer { size = 32; align = 8; signed = 1; encoding = none; base = 
10; } _prev_tid;
		integer { size = 32; align = 8; signed = 1; encoding = none; base = 
10; } _prev_prio;
		integer { size = 64; align = 8; signed = 1; encoding = none; base = 
10; } _prev_state;
		integer { size = 8; align = 8; signed = 0; encoding = UTF8; base = 10; 
} _next_comm[16];
		integer { size = 32; align = 8; signed = 1; encoding = none; base = 
10; } _next_tid;
		integer { size = 32; align = 8; signed = 1; encoding = none; base = 
10; } _next_prio;
	};
};

-- 
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