[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Announcement: xenalyze trace analysis tool released



Hi, George

It's interesting tool.
I got many error on x86_64 dom0 while compiling. The patch fixes these.

gcc -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes 
-Wno-unused-value -Wdeclaration-after-statement -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -Werror -o xenalyze xenalyze.c
cc1: warnings being treated as errors
xenalyze.c: In function 'init_hvm_data':
xenalyze.c:1321: warning: format '%d' expects type 'int', but argument 3 has 
type 'size_t'
xenalyze.c: In function 'hvm_msr_write_process':
xenalyze.c:4055: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'hvm_msr_read_process':
xenalyze.c:4104: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'shadow_emulate_process':
xenalyze.c:5128: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c:5142: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c:5156: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'shadow_parse_other':
xenalyze.c:5228: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c:5244: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c:5256: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'shadow_fixup_process':
xenalyze.c:5445: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c:5458: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c:5471: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'shadow_mmio_process':
xenalyze.c:5559: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c:5570: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'vcpu_create':
xenalyze.c:6080: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'domain_create':
xenalyze.c:6122: warning: format '%d' expects type 'int', but argument 4 has 
type 'long unsigned int'
xenalyze.c: In function 'scan_for_new_pcpu':
xenalyze.c:7119: warning: format '%lld' expects type 'long long int', but 
argument 5 has type 'loff_t'
xenalyze.c: In function 'process_cpu_change':
xenalyze.c:7194: warning: format '%llx' expects type 'long long unsigned int', 
but argument 4 has type 'loff_t'
xenalyze.c:7194: warning: format '%llx' expects type 'long long unsigned int', 
but argument 5 has type 'loff_t'
xenalyze.c:7220: warning: format '%lld' expects type 'long long int', but 
argument 5 has type 'loff_t'
xenalyze.c:7245: warning: format '%llx' expects type 'long long unsigned int', 
but argument 5 has type 'loff_t'
xenalyze.c: In function '__read_record':
xenalyze.c:7538: warning: format '%d' expects type 'int', but argument 4 has 
type 'ssize_t'
xenalyze.c:7547: warning: format '%d' expects type 'int', but argument 4 has 
type 'ssize_t'
xenalyze.c:7547: warning: format '%d' expects type 'int', but argument 5 has 
type 'ssize_t'
xenalyze.c: In function '__fill_in_record_info':
xenalyze.c:7594: warning: format '%016llx' expects type 'long long unsigned 
int', but argument 3 has type 'loff_t'
make: *** [xenalyze] Error 1

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>

Best Regards,

Akio Takebe
diff -r 46d869f585a1 dump-raw.c
--- a/dump-raw.c        Thu Aug 13 16:07:06 2009 +0100
+++ b/dump-raw.c        Fri Aug 14 09:21:51 2009 +0900
@@ -94,7 +94,7 @@
         return 0;
     } else if(r < sizeof(uint32_t)) {
         /* Full header not read */
-        fprintf(stderr, "%s: short read (%d bytes)\n",
+        fprintf(stderr, "%s: short read (%ld bytes)\n",
                 __func__, r);
         exit(1);
     }
@@ -103,7 +103,7 @@
 
     if(r < rsize) {
         /* Full record not read */
-        fprintf(stderr, "%s: short read (%d, expected %d)\n",
+        fprintf(stderr, "%s: short read (%ld, expected %ld)\n",
                 __func__, r, rsize);
         return 0;
     }
@@ -145,7 +145,7 @@
 
     /* File sanity check */
     if(p->file_offset != p->next_cpu_change_offset) {
-        printf("Strange, pcpu %d expected offet %llx, actual %llx!\n",
+        printf("Strange, pcpu %d expected offet %lx, actual %lx!\n",
                 p->pid, p->next_cpu_change_offset, p->file_offset);
     }
 
@@ -158,7 +158,7 @@
     struct record_info *ri = &p->ri;
     int i;
     
-    printf("R p%2d o%016llx %8lx %d ",
+    printf("R p%2d o%016lx %8lx %d ",
            p->pid, p->file_offset,
            (unsigned long)ri->rec.event, ri->rec.extra_words);
 
diff -r 46d869f585a1 xenalyze.c
--- a/xenalyze.c        Thu Aug 13 16:07:06 2009 +0100
+++ b/xenalyze.c        Fri Aug 14 09:21:51 2009 +0900
@@ -1317,7 +1317,7 @@
         if(h->summary.extint_histogram)
             bzero(h->summary.extint_histogram, size);
         else {
-            fprintf(stderr, "FATAL: Could not allocate %d bytes for interrupt 
histogram!\n",
+            fprintf(stderr, "FATAL: Could not allocate %ld bytes for interrupt 
histogram!\n",
                     size);
             exit(1);
         }
@@ -4051,7 +4051,7 @@
 
     if(ri->extra_words != (sizeof(*r)/sizeof(unsigned long) + 1))
     {
-        fprintf(warn, "FATAL: msr_write extra_words %d, expected %d!\n",
+        fprintf(warn, "FATAL: msr_write extra_words %d, expected %ld!\n",
                 ri->extra_words, sizeof(*r)/sizeof(unsigned long));
         dump_unexpected_and_exit(ri);
     } 
@@ -4100,7 +4100,7 @@
 
     if(ri->extra_words != (sizeof(*r)/sizeof(unsigned long) + 1))
     {
-        fprintf(warn, "FATAL: msr_read extra_words %d, expected %d!\n",
+        fprintf(warn, "FATAL: msr_read extra_words %d, expected %ld!\n",
                 ri->extra_words, sizeof(*r)/sizeof(unsigned long));
         dump_unexpected_and_exit(ri);
     } 
@@ -5123,7 +5123,7 @@
     case 2:
         if(sizeof(r->gpl2) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl2), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5137,7 +5137,7 @@
     case 3:
         if(sizeof(r->gpl3) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl3), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5151,7 +5151,7 @@
     case 4:
         if(sizeof(r->gpl4) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl4), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5223,7 +5223,7 @@
     case 2:
         if(sizeof(r->gpl2) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl2), rec_gpl,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5239,7 +5239,7 @@
     case 3:
         if(sizeof(r->gpl3) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl3), rec_gpl,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5251,7 +5251,7 @@
     case 4:
         if(sizeof(r->gpl4) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl4), rec_gpl,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5440,7 +5440,7 @@
     case 2:
         if(sizeof(r->gpl2) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl2), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5453,7 +5453,7 @@
     case 3:
         if(sizeof(r->gpl3) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl3), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5466,7 +5466,7 @@
     case 4:
         if(sizeof(r->gpl4) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl4), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5554,7 +5554,7 @@
     case 3:
         if(sizeof(r->gpl2) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl2), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -5565,7 +5565,7 @@
     case 4:
         if(sizeof(r->gpl4) != ri->extra_words * 4)
         {
-            fprintf(warn, "%s: expected %d bytes for %d-level guest, got 
%d!\n",
+            fprintf(warn, "%s: expected %ld bytes for %d-level guest, got 
%d!\n",
                     __func__, sizeof(r->gpl4), h->v->guest_paging_levels,
                     ri->extra_words * 4);
             dump_unexpected_and_exit(ri);
@@ -6077,7 +6077,7 @@
 
     if((v=malloc(sizeof(*v)))==NULL)
     {
-        fprintf(stderr, "%s: malloc %d failed!\n", __func__, sizeof(*d));
+        fprintf(stderr, "%s: malloc %ld failed!\n", __func__, sizeof(*d));
         exit(1);
     }
 
@@ -6119,7 +6119,7 @@
 
     if((d=malloc(sizeof(*d)))==NULL)
     {
-        fprintf(stderr, "%s: malloc %d failed!\n", __func__, sizeof(*d));
+        fprintf(stderr, "%s: malloc %ld failed!\n", __func__, sizeof(*d));
         exit(1);
     }
 
@@ -7115,7 +7115,7 @@
     if(cd->cpu > P.max_active_pcpu || !P.pcpu[cd->cpu].active) {
         struct pcpu_info *p = P.pcpu + cd->cpu;
 
-        fprintf(warn, "%s: Activating pcpu %d at offset %lld\n",
+        fprintf(warn, "%s: Activating pcpu %d at offset %ld\n",
                 __func__, cd->cpu, offset);
 
         p->active = 1;
@@ -7190,7 +7190,7 @@
 
     /* File sanity check */
     if(p->file_offset != p->next_cpu_change_offset) {
-        fprintf(warn, "Strange, pcpu %d expected offet %llx, actual %llx!\n",
+        fprintf(warn, "Strange, pcpu %d expected offet %lx, actual %lx!\n",
                 p->pid, p->next_cpu_change_offset, p->file_offset);
     }
 
@@ -7216,7 +7216,7 @@
         if(r->cpu > P.max_active_pcpu)
             P.max_active_pcpu = r->cpu;
 
-        fprintf(warn, "%s: Activating pcpu %d at offset %lld\n",
+        fprintf(warn, "%s: Activating pcpu %d at offset %ld\n",
                __func__, r->cpu, p->file_offset);
         
         sched_default_vcpu_activate(p2);
@@ -7241,7 +7241,7 @@
         if(p->file_offset > G.file_size) {
             activate_early_eof();
         } else if(P.early_eof && p->file_offset > P.last_epoch_offset) {
-            fprintf(warn, "%s: early_eof activated, pcpu %d past 
last_epoch_offset %llx, deactivating.\n",
+            fprintf(warn, "%s: early_eof activated, pcpu %d past 
last_epoch_offset %lx, deactivating.\n",
                     __func__, p->pid, P.last_epoch_offset);
             deactivate_pcpu(p);
         }
@@ -7534,7 +7534,7 @@
         return 0;
     } else if(r < sizeof(uint32_t)) {
         /* Full header not read */
-        fprintf(stderr, "%s: short read (%d bytes)\n",
+        fprintf(stderr, "%s: short read (%ld bytes)\n",
                 __func__, r);
         exit(1);
     }
@@ -7543,7 +7543,7 @@
 
     if(r < rsize) {
         /* Full record not read */
-        fprintf(stderr, "%s: short read (%d, expected %d)\n",
+        fprintf(stderr, "%s: short read (%ld, expected %ld)\n",
                 __func__, r, rsize);
         return 0;
     }
@@ -7589,7 +7589,7 @@
 
     if ( opt.dump_raw_reads ) {
         int i;
-        printf("R p%2d o%016llx %8lx %d ",
+        printf("R p%2d o%016lx %8lx %d ",
                p->pid, p->file_offset,
                (unsigned long)ri->rec.event, ri->rec.extra_words);
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.