debuggers.hg

changeset 22860:b9017fdaad4d

x86: Do not pollute namespace with asm defns of PERFC_*.

This fixes the build with perfc=y.

Signed-off-by: Keir Fraser <keir@xen.org>
author Keir Fraser <keir@xen.org>
date Wed Jan 26 08:35:24 2011 +0000 (2011-01-26)
parents f28ab5926896
children 4785c70c2b6d
files xen/arch/x86/x86_32/asm-offsets.c xen/arch/x86/x86_32/entry.S xen/arch/x86/x86_64/asm-offsets.c xen/arch/x86/x86_64/compat/entry.S xen/arch/x86/x86_64/entry.S xen/include/asm-x86/x86_32/asm_defns.h xen/include/asm-x86/x86_64/asm_defns.h
line diff
     1.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Wed Jan 26 08:17:14 2011 +0000
     1.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Wed Jan 26 08:35:24 2011 +0000
     1.3 @@ -120,8 +120,8 @@ void __dummy__(void)
     1.4      BLANK();
     1.5  
     1.6  #if PERF_COUNTERS
     1.7 -    DEFINE(PERFC_hypercalls, PERFC_hypercalls);
     1.8 -    DEFINE(PERFC_exceptions, PERFC_exceptions);
     1.9 +    DEFINE(ASM_PERFC_hypercalls, PERFC_hypercalls);
    1.10 +    DEFINE(ASM_PERFC_exceptions, PERFC_exceptions);
    1.11      BLANK();
    1.12  #endif
    1.13  
     2.1 --- a/xen/arch/x86/x86_32/entry.S	Wed Jan 26 08:17:14 2011 +0000
     2.2 +++ b/xen/arch/x86/x86_32/entry.S	Wed Jan 26 08:35:24 2011 +0000
     2.3 @@ -147,7 +147,7 @@ 1:      sti
     2.4          GET_CURRENT(%ebx)
     2.5          cmpl  $NR_hypercalls,%eax
     2.6          jae   bad_hypercall
     2.7 -        PERFC_INCR(PERFC_hypercalls, %eax, %ebx)
     2.8 +        PERFC_INCR(hypercalls, %eax, %ebx)
     2.9  #ifndef NDEBUG
    2.10          /* Create shadow parameters and corrupt those not used by this call. */
    2.11          pushl %eax
    2.12 @@ -446,7 +446,7 @@ 1:      xorl  %eax,%eax
    2.13          movl  %esp,%edx
    2.14          pushl %edx                      # push the cpu_user_regs pointer
    2.15          GET_CURRENT(%ebx)
    2.16 -        PERFC_INCR(PERFC_exceptions, %eax, %ebx)
    2.17 +        PERFC_INCR(exceptions, %eax, %ebx)
    2.18          call  *exception_table(,%eax,4)
    2.19          addl  $4,%esp
    2.20          movl  UREGS_eflags(%esp),%eax
     3.1 --- a/xen/arch/x86/x86_64/asm-offsets.c	Wed Jan 26 08:17:14 2011 +0000
     3.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c	Wed Jan 26 08:35:24 2011 +0000
     3.3 @@ -146,8 +146,8 @@ void __dummy__(void)
     3.4      BLANK();
     3.5  
     3.6  #if PERF_COUNTERS
     3.7 -    DEFINE(PERFC_hypercalls, PERFC_hypercalls);
     3.8 -    DEFINE(PERFC_exceptions, PERFC_exceptions);
     3.9 +    DEFINE(ASM_PERFC_hypercalls, PERFC_hypercalls);
    3.10 +    DEFINE(ASM_PERFC_exceptions, PERFC_exceptions);
    3.11      BLANK();
    3.12  #endif
    3.13  
     4.1 --- a/xen/arch/x86/x86_64/compat/entry.S	Wed Jan 26 08:17:14 2011 +0000
     4.2 +++ b/xen/arch/x86/x86_64/compat/entry.S	Wed Jan 26 08:35:24 2011 +0000
     4.3 @@ -62,7 +62,7 @@ UNLIKELY_START(ne, compat_trace)
     4.4  #undef SHADOW_BYTES
     4.5  UNLIKELY_END(compat_trace)
     4.6          leaq  compat_hypercall_table(%rip),%r10
     4.7 -        PERFC_INCR(PERFC_hypercalls, %rax, %rbx)
     4.8 +        PERFC_INCR(hypercalls, %rax, %rbx)
     4.9          callq *(%r10,%rax,8)
    4.10  #ifndef NDEBUG
    4.11          /* Deliberately corrupt parameter regs used by this hypercall. */
     5.1 --- a/xen/arch/x86/x86_64/entry.S	Wed Jan 26 08:17:14 2011 +0000
     5.2 +++ b/xen/arch/x86/x86_64/entry.S	Wed Jan 26 08:35:24 2011 +0000
     5.3 @@ -161,7 +161,7 @@ UNLIKELY_START(ne, trace)
     5.4  #undef SHADOW_BYTES
     5.5  UNLIKELY_END(trace)
     5.6          leaq  hypercall_table(%rip),%r10
     5.7 -        PERFC_INCR(PERFC_hypercalls, %rax, %rbx)
     5.8 +        PERFC_INCR(hypercalls, %rax, %rbx)
     5.9          callq *(%r10,%rax,8)
    5.10  #ifndef NDEBUG
    5.11          /* Deliberately corrupt parameter regs used by this hypercall. */
    5.12 @@ -464,7 +464,7 @@ 1:      movq  %rsp,%rdi
    5.13          movl  UREGS_entry_vector(%rsp),%eax
    5.14          leaq  exception_table(%rip),%rdx
    5.15          GET_CURRENT(%rbx)
    5.16 -        PERFC_INCR(PERFC_exceptions, %rax, %rbx)
    5.17 +        PERFC_INCR(exceptions, %rax, %rbx)
    5.18          callq *(%rdx,%rax,8)
    5.19          testb $3,UREGS_cs(%rsp)
    5.20          jz    restore_all_xen
     6.1 --- a/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jan 26 08:17:14 2011 +0000
     6.2 +++ b/xen/include/asm-x86/x86_32/asm_defns.h	Wed Jan 26 08:35:24 2011 +0000
     6.3 @@ -86,7 +86,7 @@ 1:      addl  $4,%esp;
     6.4          pushl _cur;                                     \
     6.5          movl VCPU_processor(_cur),_cur;                 \
     6.6          movl __per_cpu_offset(,_cur,4),_cur;            \
     6.7 -        incl per_cpu__perfcounters+_name*4(_cur,_idx,4);\
     6.8 +        incl per_cpu__perfcounters+ASM_PERFC_##_name*4(_cur,_idx,4);\
     6.9          popl _cur
    6.10  #else
    6.11  #define PERFC_INCR(_name,_idx,_cur)
     7.1 --- a/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jan 26 08:17:14 2011 +0000
     7.2 +++ b/xen/include/asm-x86/x86_64/asm_defns.h	Wed Jan 26 08:35:24 2011 +0000
     7.3 @@ -72,7 +72,7 @@ 1:      addq  $8,%rsp;
     7.4          leaq per_cpu__perfcounters(%rip),%rdx;  \
     7.5          addq %rdx,_cur;                         \
     7.6          popq %rdx;                              \
     7.7 -        incl _name*4(_cur,_idx,4);              \
     7.8 +        incl ASM_PERFC_##_name*4(_cur,_idx,4);  \
     7.9          popq _cur
    7.10  #else
    7.11  #define PERFC_INCR(_name,_idx,_cur)