|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] Spinlock profiling (enable in buildwith lock_profile=y)
Masaki Kanno wrote: > Hi, > > I got the following error. > > gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m32 -march > =i686 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno- > unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -MMD -MF . > xenlockprof.o.d -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - > D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs - > Werror -I ../../tools/python/xen/lowlevel/xc -I ../../tools/libxc -I ../.. > /tools/include -c -o xenlockprof.o xenlockprof.c > cc1: warnings being treated as errors > xenlockprof.c: In function ‘main’: > xenlockprof.c:128: warning: format ‘%12ld’ expects type ‘long int’, > but argument 3 has type ‘uint64_t’ > xenlockprof.c:128: warning: format ‘%12ld’ expects type ‘long int’, > but argument 5 has type ‘uint64_t’ > make[4]: *** [xenlockprof.o] Error 1 > make[4]: Leaving directory `/xen/xen-unstable.hg/tools/misc' > make[3]: *** [subdir-install-misc] Error 2 > make[3]: Leaving directory `/xen/xen-unstable.hg/tools' > make[2]: *** [subdirs-install] Error 2 > make[2]: Leaving directory `/xen/xen-unstable.hg/tools' > make[1]: *** [install-tools] Error 2 > make[1]: Leaving directory `/xen/xen-unstable.hg' > make: *** [world] Error 2 Sorry, I've got no 32 bit machine to test. Attached patch should correct this. Juergen -- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 636 47950 Fujitsu Technolgy Solutions e-mail: juergen.gross@xxxxxxxxxxxxxx Otto-Hahn-Ring 6 Internet: ts.fujitsu.com D-81739 Muenchen Company details: ts.fujitsu.com/imprint.html Signed-off-by: juergen.gross@xxxxxxxxxxxxxx
diff -r 18758847bf31 tools/misc/xenlockprof.c
--- a/tools/misc/xenlockprof.c Wed Oct 14 09:09:23 2009 +0100
+++ b/tools/misc/xenlockprof.c Thu Oct 15 06:53:27 2009 +0200
@@ -39,6 +39,7 @@
uint32_t i, j, n;
uint64_t time;
double l, b, sl, sb;
+ long long int lc, bc;
char name[60];
xc_lockprof_data_t *data;
@@ -124,8 +125,10 @@
b = (double)(data[j].block_time) / 1E+09;
sl += l;
sb += b;
- printf("%-50s: lock:%12ld(%20.9fs), block:%12ld(%20.9fs)\n",
- name, data[j].lock_cnt, l, data[j].block_cnt, b);
+ lc = data[j].lock_cnt;
+ bc = data[j].block_cnt;
+ printf("%-50s: lock:%12lld(%20.9fs), block:%12lld(%20.9fs)\n",
+ name, lc, l, bc, b);
}
l = (double)time / 1E+09;
printf("total profiling time: %20.9fs\n", l);
diff -r 18758847bf31 xen/common/spinlock.c
--- a/xen/common/spinlock.c Wed Oct 14 09:09:23 2009 +0100
+++ b/xen/common/spinlock.c Thu Oct 15 07:02:46 2009 +0200
@@ -354,13 +354,17 @@
static void spinlock_profile_print_elem(struct lock_profile *data,
int32_t type, int32_t idx, void *par)
{
+ long long int lc, bc;
+
if (type == LOCKPROF_TYPE_GLOBAL)
printk("%s %s:\n", lock_profile_ancs[idx].name, data->name);
else
printk("%s %d %s:\n", lock_profile_ancs[idx].name, idx, data->name);
- printk(" lock:%12ld(%08X:%08X), block:%12ld(%08X:%08X)\n",
- data->lock_cnt, (u32)(data->time_hold >> 32), (u32)data->time_hold,
- data->block_cnt, (u32)(data->time_block >> 32), (u32)data->time_block);
+ lc = data->lock_cnt;
+ bc = data->block_cnt;
+ printk(" lock:%12lld(%08X:%08X), block:%12lld(%08X:%08X)\n",
+ lc, (u32)(data->time_hold >> 32), (u32)data->time_hold,
+ bc, (u32)(data->time_block >> 32), (u32)data->time_block);
return;
}
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |