|
|
|
|
|
|
|
|
|
|
xen-devel
[xen-devel] [PATCH] perfc: fix build error with perfc=y
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 <=
|
|
|
|
|