Re: [PATCH] Write event stream in file

2019-06-25 Thread Sebastian Huber
On 25/06/2019 07:33, Chris Johns wrote: On 25/6/19 2:50 pm, Ravindra Meena wrote: misc/record/record-main.c | 38 +++--- I feel a top level directory for `trace` in rtems-tools will make is easier to collect and group all trace relate code and tools. I suggest .

Re: [PATCH] Write event stream in file

2019-06-25 Thread Sebastian Huber
On 25/06/2019 10:49, Ravindra Kumar Meena wrote: >     [242/254] Compiling misc/record/record-main.c >     ../misc/record/record-main.c: In function ‘print_item’: >     ../misc/record/record-main.c:152:14: warning: variable ‘seconds’ set >     but >     not used [-W

Re: [PATCH] Write event stream in file

2019-06-25 Thread Sebastian Huber
On 25/06/2019 10:49, Ravindra Kumar Meena wrote: >     [242/254] Compiling misc/record/record-main.c >     ../misc/record/record-main.c: In function ‘print_item’: >     ../misc/record/record-main.c:152:14: warning: variable ‘seconds’ set >     but >     not used [-W

Re: [PATCH] Write event stream in file

2019-06-25 Thread Ravindra Kumar Meena
> > > [242/254] Compiling misc/record/record-main.c > > ../misc/record/record-main.c: In function ‘print_item’: > > ../misc/record/record-main.c:152:14: warning: variable ‘seconds’ set > > but > > not used [-Wunused-but-set-variable] > >uint32_t seconds; > >

Re: [PATCH] Write event stream in file

2019-06-25 Thread Sebastian Huber
On 25/06/2019 09:48, Ravindra Kumar Meena wrote: >     Do you get compiler warnings with this version? > > > No I didn't get any compiler warning or error. How did you configure the build? Did you somehow disable the warnings? [242/254] Compiling misc/record/record-

Re: [PATCH] Write event stream in file

2019-06-25 Thread Ravindra Kumar Meena
> > > Do you get compiler warnings with this version? > > > > > > No I didn't get any compiler warning or error. > > How did you configure the build? Did you somehow disable the warnings? > [242/254] Compiling misc/record/record-main.c > ../misc/record/record-main.c: In function ‘print_item’:

Re: [PATCH] Write event stream in file

2019-06-24 Thread Chris Johns
On 25/6/19 2:50 pm, Ravindra Meena wrote: > misc/record/record-main.c | 38 +++--- I feel a top level directory for `trace` in rtems-tools will make is easier to collect and group all trace relate code and tools. I suggest ... trace/record/... trace/ctf/... trac

Re: [PATCH] Write event stream in file

2019-06-24 Thread Sebastian Huber
On 25/06/2019 07:03, Ravindra Kumar Meena wrote: Do you get compiler warnings with this version? No I didn't get any compiler warning or error. How did you configure the build? Did you somehow disable the warnings? [242/254] Compiling misc/record/record-main.c ../misc/record/record-main

Re: [PATCH] Write event stream in file

2019-06-24 Thread Ravindra Kumar Meena
> > > Do you get compiler warnings with this version? > No I didn't get any compiler warning or error. -- *Ravindra Kumar Meena*, B. Tech. Computer Science and Engineering, Indian Institute of Technology (Indian School of Mines) , Dhanbad _

Re: [PATCH] Write event stream in file

2019-06-24 Thread Sebastian Huber
Do you get compiler warnings with this version? -- 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.hu...@embedded-brains.de PGP : Public key available on request. Diese N

[PATCH] Write event stream in file

2019-06-24 Thread Ravindra Meena
--- misc/record/record-main.c | 38 +++--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/misc/record/record-main.c b/misc/record/record-main.c index 742428b..61cbb4e 100644 --- a/misc/record/record-main.c +++ b/misc/record/record-main.c @@ -67,6 +6

Re: [PATCH] Write event stream in file

2019-06-21 Thread Gedare Bloom
On Fri, Jun 21, 2019 at 8:51 AM Ravindra Kumar Meena 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 err

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
> > >> 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] C

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
> > > 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 o

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
> > > I was able to store the event stream in file. I have sent the patch for > > the same. It has only one warning that I have to discuss with you. > > > > ../misc/record/record-main.c:172:14: warning: ‘ns’ may be used > > uninitialized in this function [-Wmaybe-uninitialized] > > ctf_item.ns=

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber
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 cr

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber
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.

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber
On 21/06/2019 13:20, Ravindra Kumar Meena wrote: Hi, I was able to store the event stream in file. I have sent the patch for the same. It has only one warning that I have to discuss with you. ../misc/record/record-main.c:172:14: warning: ‘ns’ may be used uninitialized in this function [-Wmay

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
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

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
Hi, I was able to store the event stream in file. I have sent the patch for the same. It has only one warning that I have to discuss with you. ../misc/record/record-main.c:172:14: warning: ‘ns’ may be used uninitialized in this function [-Wmaybe-uninitialized] ctf_item.ns=ns; ^ .

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber
On 21/06/2019 10:33, Ravindra Kumar Meena wrote: The static void print_item( FILE *f, const client_item *item ) gets already a file, please use it. The file is currently stdout.  This should be changed to an event stream file.  Add the file pointer to client_context an

Re: [PATCH] Write event stream in file

2019-06-21 Thread Ravindra Kumar Meena
> > > The > > static void print_item( FILE *f, const client_item *item ) > > gets already a file, please use it. > > The file is currently stdout. This should be changed to an event stream > file. Add the file pointer to client_context and open the file in main(). > > Are you suggesting to change

Re: [PATCH] Write event stream in file

2019-06-21 Thread Sebastian Huber
On 21/06/2019 08:57, Ravindra Kumar Meena wrote: >     seconds = (uint32_t) ( item->ns / 10 ); >     nanoseconds = (uint32_t) ( item->ns % 10 ); > +    ns=nanoseconds; Why not move the nanoseconds variable into the upper block? Okay >     fprintf( f, "%

Re: [PATCH] Write event stream in file

2019-06-20 Thread Ravindra Kumar Meena
> > seconds = (uint32_t) ( item->ns / 10 ); > > nanoseconds = (uint32_t) ( item->ns % 10 ); > > +ns=nanoseconds; > > Why not move the nanoseconds variable into the upper block? > Okay > > > fprintf( f, "%" PRIu32 ".%09" PRIu32 ":", seconds, nanoseconds ); > > } el

Re: [PATCH] Write event stream in file

2019-06-20 Thread Sebastian Huber
- Am 20. Jun 2019 um 14:17 schrieb Ravindra Kumar Meena rmeena...@gmail.com: > --- > misc/record/record-main.c | 27 +++ > 1 file changed, 27 insertions(+) > > diff --git a/misc/record/record-main.c b/misc/record/record-main.c > index 742428b..eccf291 100644 > --- a/mis

[PATCH] Write event stream in file

2019-06-20 Thread Ravindra Meena
--- misc/record/record-main.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/misc/record/record-main.c b/misc/record/record-main.c index 742428b..eccf291 100644 --- a/misc/record/record-main.c +++ b/misc/record/record-main.c @@ -67,6 +67,13 @@ typedef struct clien