All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Re: [Xen-changelog] [xen-unstable] Spinlock profiling (enable in buildwith lock_profile=y)
Date: Thu, 15 Oct 2009 07:03:38 +0200	[thread overview]
Message-ID: <4AD6AD2A.2070602@ts.fujitsu.com> (raw)
In-Reply-To: <3CA4D28AE2337kanno.masaki@jp.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

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@ts.fujitsu.com
Otto-Hahn-Ring 6                        Internet: ts.fujitsu.com
D-81739 Muenchen                 Company details: ts.fujitsu.com/imprint.html

[-- Attachment #2: xenlockprof.patch --]
[-- Type: text/x-patch, Size: 1937 bytes --]

Signed-off-by: juergen.gross@ts.fujitsu.com

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;
 }
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2009-10-15  5:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200910140815.n9E8FKMD001374@xenbits.xensource.com>
2009-10-14 23:47 ` [Xen-changelog] [xen-unstable] Spinlock profiling (enable in buildwith lock_profile=y) Masaki Kanno
2009-10-15  5:03   ` Juergen Gross [this message]
2009-10-15  7:30     ` Re: [Xen-changelog] [xen-unstable] Spinlock profiling(enable " Masaki Kanno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD6AD2A.2070602@ts.fujitsu.com \
    --to=juergen.gross@ts.fujitsu.com \
    --cc=kanno.masaki@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.