GSoC Project | Basic Support for Trace Compass

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 28 07:43:55 UTC 2019


On 27/06/2019 19:18, Ravindra Kumar Meena wrote:
>      > Okay. Raw file contents have this structure. It means raw file
>     will only
>      > contain event and data in binary format. How should I get it's
>      > corresponding ns and cpu values.
> 
>     1. Instead of the socket() and connect() you open the file
>     descriptor with open().
> 
>     2. Instead of using recv() to read from the file descriptor you use
>     read().  See below.
> 
> 
> Wow!!. The file descriptor is a very nice concept. I learned about it 
> during my 3rd year of graduation but I never thought I would ever apply 
> it :)
> 
> https://www.geeksforgeeks.org/input-output-system-calls-c-create-open-close-read-write/
> 
> The 2nd task is complete. Have made a push on my GitHub rtems-tools 
> workplace
> https://github.com/rmeena840/rtems-tools/commit/362a6fc94886f298d207021ce5f2dad48783c0da
> 
> Have a look
> 
> I tried the command on my machine it's working fine with the raw data 
> created today. The babeltrace is able to print all values.
> 
> I used "./build/misc/rtems-record --input raw_data | head" command 
> generating ctf events from raw data

As I said a couple of time before. Please fix the compiler warnings:

../misc/record/record-main.c:57:23: warning: character constant too long 
for its type
    { "input", 1, NULL, 'input' },
                        ^~~~~~~
../misc/record/record-main.c: In function ‘main’:
../misc/record/record-main.c:308:12: warning: character constant too 
long for its type
        case 'input':
             ^~~~~~~

I am a bit surprised that this code compiles at all.

There is a bug (from me) in the while loop.

      ssize_t n;

      n = ( input_file_flag ) ? read(fd, buf, 10) : recv( fd, buf, 
sizeof( buf ), 0 );
-    if ( n >= 0 ) {
+    if ( n > 0 ) {
        rtems_record_client_run( &ctx, buf, (size_t) n );
      } else {
        break;

Could you please give me permission to push to your repository. I would 
like to add a record item stream from a QorIQ T4240.

lttng seems to create one event stream file per processor. This is your 
next task.

1. Open a event stream file for each processor.

2. Write the events of a processor (CPU) to the corresponding file.

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