GSoC Project | Basic Support for Trace Compass

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 4 06:51:08 UTC 2019


On 04/07/2019 08:41, Sebastian Huber wrote:
> On 04/07/2019 08:36, Ravindra Kumar Meena wrote:
>>     This change isn't right. We want to use the file per CPU exactly 
>> to get
>>     rid of this member.
>>      >
>>     
>> https://github.com/rmeena840/rtems-tools/commit/582b999b135ddcbc1fc88a9ee2b302fe811382a7 
>>
>>      >
>>      > I have added cpu_id in ctf_event so that babeltrace knows that 
>> which
>>      > cpu_id is it reading.
>>
>>     In your metadata you removed the cpu member from the event structure.
>>
>> I removed it because the new binary stream file does not have CPU. It 
>> has only three values ns, event, and data.
> 
> In commit 582b999b135ddcbc1fc88a9ee2b302fe811382a7 we have:
> 
> typedef struct ctf_event {
>    uint32_t                     cpu_id;
>    uint64_t                     ns;
>    rtems_record_event           event;
>    uint64_t                     data;
> } ctf_event;
> 
> So, the new binary stream is not new, it still has the CPU member!
> 
> The CPU member must move to the packet header. The packet header tells 
> the consumer (e.g. babeltrace): the following events of this packet all 
> belong to this CPU.

Your latest versions has a warning:

../misc/record/record-main.c: In function ‘main’:
../misc/record/record-main.c:135:59: warning: ‘input_file’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
    fd = ( input_file_flag ) ? open( input_file, O_RDONLY ) :
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    socket( PF_INET, SOCK_STREAM, 0 );
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../misc/record/record-main.c:278:15: note: ‘input_file’ was declared here
    const char *input_file;
                ^~~~~~~~~~

Do you see this warning in your build? If no, then we should find out, 
why you don't see warnings. If yes, then you should fix the warnings 
before a commit. If you don't know how to fix the warning, then ask on 
the mailing list. I don't want to see a warning the next time I build 
your program. I think I mentioned this a couple of times before. 
Normally it should be enough to mention it once.

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