Skip to contentSkip to conversation

modify for new xentrace format.

PATCH New Atsushi SAKAI 1 participant 1 message Oct 4, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modify for new xentrace format.

Hi,

This patch modify xenbaked (used by xenmon.py) for new xentrace format.

Thanks
Atsushi SAKAI

tools/xenmon/xenbaked.c +3 -3
diff -r 307a8688a9e3 tools/xenmon/xenbaked.c
@@ -478,7 +478,7 @@ int monitor_tbufs(void)
 
     void *tbufs_mapped;          /* pointer to where the tbufs are mapped    */
     struct t_buf **meta;         /* pointers to the trace buffer metadata    */
-    struct t_rec **data;         /* pointers to the trace buffer data areas
+    char         **data;         /* pointers to the trace buffer data areas
                                   * where they are mapped into user space.   */
     unsigned long tbufs_mfn;     /* mfn of the tbufs                         */
     unsigned int  num;           /* number of trace buffers / logical CPUS   */
@@ -503,7 +503,7 @@ int monitor_tbufs(void)
 
     /* build arrays of convenience ptrs */
     meta  = init_bufs_ptrs (tbufs_mapped, num, size);
-    data  = init_rec_ptrs(meta, num);
+    data  = (char **)init_rec_ptrs(meta, num);
 
     if ( eventchn_init() < 0 )
         fprintf(stderr, "Failed to initialize event channel; "
@@ -518,7 +518,7 @@ int monitor_tbufs(void)
             {
                 rmb(); /* read prod, then read item. */
                 rec_size = process_record(
-                    i, data[i] + meta[i]->cons % data_size);
+                    i, (struct t_rec *)(data[i] + meta[i]->cons % data_size));
                 mb(); /* read item, then update cons. */
                 meta[i]->cons += rec_size;
             }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel