GSoC Project | Basic Support for Trace Compass

Ravindra Kumar Meena rmeena840 at gmail.com
Tue Aug 6 05:20:23 UTC 2019


>
> >
> > Have made changes. Simplified the code.
> >
> https://github.com/rmeena840/rtems-tools/commit/9e09be40db85e4e903118f8eb5eb1ea1e41baf46
>
> Yes, this moves into the right direction:
>
> +      for( i = 0; i < THREAD_NAME_SIZE - 1; i++ ){
> +        if( cctx->thread_names[ api_id ][ thread_id ][ i ] == 0x00 ){
> +          cctx->thread_names[ api_id ][ thread_id ][ i ] = (
> thread_name  & 0xff );
> +          thread_name = ( thread_name >> 8 );
> +        }
> +      }
>
> On a 32-bit target you may get up to 4 RTEMS_RECORD_THREAD_NAME events,
> on a 64-bit target you may get up to 2 RTEMS_RECORD_THREAD_NAME events.
>
> Your code overwrites the data from previous name events and only the
> last one is visible. You have to add the name index (i) to thread_id_name.
>
The overwrites thing is taken care of by :
if( cctx->thread_names[ api_id ][ thread_id ][ i ] == 0x00 )

If thread_name is received for the same api_id and thread_id then it will
write only in empty char position.
I checked the value with the provided output. The value is the same but in
reverse order.


-- 
*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/20190806/f0f73895/attachment.html>


More information about the devel mailing list