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

[xen-devel] [PATCH] perfc: fix build error with perfc=y


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Ying-Shiuan Pan <yingshiuan.pan@xxxxxxxxx>
  • Date: Wed, 26 Jan 2011 11:54:28 +0800
  • Cc: yspan@xxxxxxxxxxx
  • Delivery-date: Tue, 25 Jan 2011 19:55:37 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; b=OC8NoCEbzM8MAIg2g4+Z6FNDeMse8AIlTLq2czRiYvcx5JRA3MTbBku1GIl/rTdSUf LEjY4THVEBUwhRvQUYqGhL0Qg8SddalJNLsCrwZ0NJQcjm5oIYnr70RMcqfESW9QPlmz xlGABVjxCV9uK1evB1qSKfr0zY5CVKY0IbKyc=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

hi, all

I found that xen cannot be built with perfc=y since the changeset:2762b6d3149c

The follow is the error message:
-----------------------------------------
gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -nostdinc -fno-builtin -fno-common -Wredundant-decls -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/root/src/xen-unstable/xen/include -I/root/src/xen-unstable/xen/include/asm-x86/mach-generic -I/root/src/xen-unstable/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -fno-exceptions -mno-red-zone -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__ -DVERBOSE -DPERF_COUNTERS -DPERF_ARRAYS -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF .domctl.o.d -c domctl.c -o domctl.o
In file included from /root/src/xen-unstable/xen/include/xen/perfc_defn.h:5,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/xen/perfc.h:43,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/asm/paging.h:31,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/asm/guest_access.h:11,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/xen/guest_access.h:10,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/xen/console.h:11,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from domctl.c:19:
/root/src/xen-unstable/xen/include/asm/perfc_defn.h:5: error: expected identifier before numeric constant
In file included from /root/src/xen-unstable/xen/include/asm/paging.h:31,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/asm/guest_access.h:11,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/xen/guest_access.h:10,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from /root/src/xen-unstable/xen/include/xen/console.h:11,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from domctl.c:19:
/root/src/xen-unstable/xen/include/xen/perfc.h:55: error: âNUM_PERFCOUNTERSâ undeclared here (not in a function)
cc1: warnings being treated as errors
/root/src/xen-unstable/xen/include/xen/perfc.h:55: warning: type defaults to âintâ in declaration of âper_cpu__perfcountersâ
-----------------------------------------

I found that in domctl.c the PERFC_exceptions and PERFC_hypercalls in the 'enum perfcounter'
from include/xen/perfc_defn.h has been replaced as a number.
however, the 2 identifiers did not be replaced in the earlier changeset (ef30046259f0)

I'm not exactly sure why it happen, and i just undef the two macro before the macro to
avoid being replaced

hope someone has a better solution


--
Signed-off-by: Ying-Shiuan Pan <yspan@xxxxxxxxxxx>

diff -r b59f04eb8978 xen/include/asm-x86/perfc_defn.h
--- a/xen/include/asm-x86/perfc_defn.hÂÂÂ Fri Jan 21 18:06:23 2011 +0000
+++ b/xen/include/asm-x86/perfc_defn.hÂÂÂ Wed Jan 26 11:33:40 2011 +0800
@@ -2,6 +2,7 @@
Â/*#ifndef __XEN_PERFC_DEFN_H__*/
Â/*#define __XEN_PERFC_DEFN_H__*/
Â
+#undef PERFC_exceptions
ÂPERFCOUNTER_ARRAY(exceptions,ÂÂÂÂÂÂÂÂÂÂ "exceptions", 32)
Â
Â#define VMX_PERF_EXIT_REASON_SIZE 56
diff -r b59f04eb8978 xen/include/xen/perfc_defn.h
--- a/xen/include/xen/perfc_defn.hÂÂÂ Fri Jan 21 18:06:23 2011 +0000
+++ b/xen/include/xen/perfc_defn.hÂÂÂ Wed Jan 26 11:33:40 2011 +0800
@@ -4,6 +4,7 @@
Â
Â#include <asm/perfc_defn.h>
Â
+#undef PERFC_hypercalls
ÂPERFCOUNTER_ARRAY(hypercalls,ÂÂÂÂÂÂÂÂÂÂ "hypercalls", NR_hypercalls)
Â
ÂPERFCOUNTER(calls_to_multicall,ÂÂÂÂÂÂÂÂ "calls to multicall")
----
Best Regards,
æçèYing-Shiuan Pan
_______________________________________________
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®.