Hi Ravindra, > -----Ursprüngliche Nachricht----- > Von: devel [mailto:devel-boun...@rtems.org] Im Auftrag von Ravindra > Kumar Meena > Gesendet: Dienstag, 25. Juni 2019 14:39 > An: Sebastian Huber > Cc: devel > Betreff: Re: GSoC Project | Basic Support for Trace Compass > > Hi Sebastian, > > Like I said that all values are correct(ns, CPU, data) except > rtems_record_event. This is happening because of byte order issue. > > This is the warning output of babeltrace > > [warning] Unknown value 927712935936 in enum. > 0 RTEMS_RECORDING_EVENT: { ns = 4281426372217274368, cpu = 0, > events = ( <unknown> : container = 927712935936 ), data = 167837702 } > [warning] Unknown value 897648164864 in enum. > 0 RTEMS_RECORDING_EVENT: { ns = 4281426372217274368, cpu = 0, > events = ( <unknown> : container = 897648164864 ), data = 32440 } > > Whatever value is passed on "ctf_item.data=item->event;" is converted > into big-endian value. That's why it giving huge value e.g 897648164864. > See the above output. > I have only had a look at the specification, but according to https://diamon.org/ctf/#spec4.1.3 you can set the global "byte_order" of your stream in the trace description of your metadata file and override this default behavior for certain types. In the metadata file of your repository (https://github.com/rmeena840/rtems-tools/blob/ravindra-rtems/misc/ctf/metadata) you set trace to: trace { major = 1; minor = 8; byte_order = le; };
Which defaults to little-endian and as far as I see you never overwrite it for your event fields. > If we change the byte order of 897648164864 then it will be 215 which is in > the range of 0 to 1023. This is what we want. > > If we could pass the big-endian value on "ctf_item.data=item->event;" then > it will work fine. I intentionally tried to pass 897648164864 directly to > "ctf_item.data=item->event;" and it was working fine because its byte > order is changed and its new value will be 215. > > I tried a few approaches but didn't work for me. Any idea how to deal with > it? > > Thanks > > > > -- > > Ravindra Kumar Meena, > B. Tech. Computer Science and Engineering, > > Indian Institute of Technology (Indian School of Mines) > <https://www.iitism.ac.in/> , Dhanbad _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel