[PATCH] Write event stream in file

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 21 12:40:42 UTC 2019


On 21/06/2019 14:28, Sebastian Huber wrote:
> On 21/06/2019 14:16, Ravindra Kumar Meena wrote:
>> Hi,
>>
>> 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().

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