> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Zhang, Yanmin
> Sent: Monday, April 19, 2010 1:33 PM
> To: Avi Kivity
> Cc: Ingo Molnar; Peter Zijlstra; Avi Kivity; Sheng Yang; 
> [email protected]; [email protected]; Marcelo 
> Tosatti; oerg Roedel; Jes Sorensen; Gleb Natapov; Zachary 
> Amsden; [email protected]; [email protected]; 
> Arnaldo Carvalho de Melo
> Subject: [PATCH V5 1/3] perf & kvm: Enhance perf to collect 
> KVM guest os statistics from host side
> 
> Below patch introduces perf_guest_info_callbacks and related 
> register/unregister
> functions. Add more PERF_RECORD_MISC_XXX bits meaning guest 
> kernel and guest user
> space.
> 
> Signed-off-by: Zhang Yanmin <[email protected]>
> 
> ---

> diff -Nraup --exclude-from=exclude.diff 
> linux-2.6_tip0417/include/linux/perf_event.h 
> linux-2.6_tip0417_perfkvm/include/linux/perf_event.h
> --- linux-2.6_tip0417/include/linux/perf_event.h      
> 2010-04-19 09:51:59.544791000 +0800
> +++ linux-2.6_tip0417_perfkvm/include/linux/perf_event.h      
> 2010-04-19 09:53:59.691378953 +0800

> @@ -932,6 +940,12 @@ static inline void perf_event_mmap(struc
>               __perf_event_mmap(vma);
>  }
>  
> +extern struct perf_guest_info_callbacks *perf_guest_cbs;
> +extern int perf_register_guest_info_callbacks(
> +             struct perf_guest_info_callbacks *);
> +extern int perf_unregister_guest_info_callbacks(
> +             struct perf_guest_info_callbacks *);
> +
>  extern void perf_event_comm(struct task_struct *tsk);
>  extern void perf_event_fork(struct task_struct *tsk);
>  
> @@ -1001,6 +1015,11 @@ perf_sw_event(u32 event_id, u64 nr, int 
>  static inline void
>  perf_bp_event(struct perf_event *event, void *data)          
>       { }
>  
> +static inline int perf_register_guest_info_callbacks
> +(struct perf_guest_info_callbacks *) {return 0; }
> +static inline int perf_unregister_guest_info_callbacks
> +(struct perf_guest_info_callbacks *) {return 0; }
> +
>  static inline void perf_event_mmap(struct vm_area_struct 
> *vma)         { }
>  static inline void perf_event_comm(struct task_struct *tsk)  
>       { }
>  static inline void perf_event_fork(struct task_struct *tsk)  
>       { }


Hi,

I met this error when built kernel. Anything wrong?

  CC      init/main.o
In file included from include/linux/ftrace_event.h:8,
                 from include/trace/syscall.h:6,
                 from include/linux/syscalls.h:75,
                 from init/main.c:16:
include/linux/perf_event.h: In function 'perf_register_guest_info_callbacks':
include/linux/perf_event.h:1019: error: parameter name omitted
include/linux/perf_event.h: In function 'perf_unregister_guest_info_callbacks':
include/linux/perf_event.h:1021: error: parameter name omitted
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to