[PATCH] Write event stream in file

Gedare Bloom gedare at rtems.org
Fri Jun 21 15:53:30 UTC 2019


On Fri, Jun 21, 2019 at 8:51 AM Ravindra Kumar Meena
<rmeena840 at gmail.com> wrote:
>>
>> >> I tried to parse the event stream file and metadata file through
>> >> babeltrace gives the following error:
>> >>
>> >> [error] Invalid magic number 0x30302E30 at packet 0 (file offset 0).
>> >> [error] Stream index creation error.
>> >> [error] Open file stream error.
>> >> [warning] [Context] Cannot open_trace of format ctf at path ctf.
>> >> [warning] [Context] cannot open trace "ctf" from ctf/ for reading.
>> >> [error] Cannot open any trace for reading.
>> >>
>> >> [error] opening trace "ctf/" for reading.
>> >>
>> >> [error] none of the specified trace paths could be opened.
>> >>
>> >> I think the metadata file is not compatible with event stream generated.
>> >
>> > Yes, indeed. I also think that the metadata doesn't describe the event
>> > stream. The metadata should describe the struct ctf_item.
>>
>> In your current version you have also calls to fprintf() mixed into the
>> fwrite() in print_item().
>
>
> Should I comment the fprintf() and leave it there or just permanently remove it?
>

Don't leave commented-out code in your code submissions.

It would be preferable if you can try to eliminate errors and warnings
as well as you can before you bring code to review, or ask questions
how to resolve some specific error/warning. It will save some mental
energy/time of code reviewers/mentors.

Gedare

>
> --
> Ravindra Kumar Meena,
> B. Tech. Computer Science and Engineering,
> Indian Institute of Technology (Indian School of Mines), Dhanbad
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list