WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] Spinlock profiling (e

To: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] Spinlock profiling (enable in buildwith lock_profile=y)
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Date: Thu, 15 Oct 2009 07:03:38 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 14 Oct 2009 22:04:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=juergen.gross@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1255583196; x=1287119196; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20Juergen=20Gross=20<juergen.gross@xxxxxxxxxxxxxx> |Subject:=20Re:=20[Xen-devel]=20Re:=20[Xen-changelog]=20[ xen-unstable]=20Spinlock=20profiling=0D=0A=20(enable=20in =20buildwith=20lock_profile=3Dy)|Date:=20Thu,=2015=20Oct =202009=2007:03:38=20+0200|Message-ID:=20<4AD6AD2A.207060 2@xxxxxxxxxxxxxx>|To:=20Masaki=20Kanno=20<kanno.masaki@jp .fujitsu.com>|CC:=20xen-devel@xxxxxxxxxxxxxxxxxxx |MIME-Version:=201.0|In-Reply-To:=20<3CA4D28AE2337kanno.m asaki@xxxxxxxxxxxxxx>|References:=20<200910140815.n9E8FKM D001374@xxxxxxxxxxxxxxxxxxxxx>=20<3CA4D28AE2337kanno.masa ki@xxxxxxxxxxxxxx>; bh=uU9sGdkS3ru2MpyEpZR0jSsr1BTPxOsyyxMpLjhLWpE=; b=VsURuB2CnKBdUFYUM3cIKOJyvoouLLc+/WV6djKMlTqiQ/TaHO4wrk/0 /JVYmPIRGq03zjWB/qf6SQHwx8vFsP+fd4A7pWKv54ODx8Jt+kvSl2jOH TnMNsPJZIz8W8VUuLHJmhKWFLUjR60PXdg88CG6ufxlxYtf8QiZLUah7R IfGFLBv3uczuSItSn+LdBlQieDkSyEj99m4DIngj33waRn2Anu+iu7Ssm YWDksNUT69v79YC6EILIAxEH860bM;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:X-Enigmail-Version:Content-Type; b=lI3P9Q8Dnh4zpecjKzl//xTkZDXAKzjwSWBIbra1biHT3kf7LZXf9Uqg zC8sxWZNGTsJqgJW5uBNae34EOEidnyGRTGNNj1wRFZE8uFhch056g8Mh zB7bZR95HeYF9L4IUT+RAFcds8Ay/kdfUwsRbwWofcLy+FIlyfpcYS5QW HUGWAddkzjtKPf2m4OYPM3z1vDRJh1F4B4kDnT6grF8m9bqAUSX5fPqcB TOc0WjuQvtq/AsKdpTSp8hAG8vGED;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <3CA4D28AE2337kanno.masaki@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Fujitsu Technology Solutions
References: <200910140815.n9E8FKMD001374@xxxxxxxxxxxxxxxxxxxxx> <3CA4D28AE2337kanno.masaki@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)
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
<Prev in Thread] Current Thread [Next in Thread>