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

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [xen-devel] [PATCH] perfc: fix build error with perfc=y
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to:cc :content-type; bh=JbExjvMqWdpVo9fH4INT01P1lN2UCnINgFh7ZFa0A3g=; b=NUyqbK55Hd4q3XsCNjhNDDu4BS+tL93WmaivkWVpHtQq9kpf9CBRm/1yN5sRyNYIAE YNJVv7XtQv5j4tRtxh1BpKLkjccr/ylI1Fp5vYVroYfqEt4MutjG8kxMUaecuhL7EfdS rZNVIF9HZHI4qErxXjtdMVe9PQ85OxrMLMQdg=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [xen-devel] [PATCH] perfc: fix build error with perfc=y, Ying-Shiuan Pan <=