lkml.org 
[lkml]   [2011]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] perf: Carve out callchain functionality
On Wed, May 11, 2011 at 03:16:56PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <borislav.petkov@amd.com>
>
> Move callchain-related code into its own module:
> kernel/events/callchain.c
>
> No functionality change.
>
> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
> ---
> include/linux/perf_event.h | 7 +-
> kernel/events/Makefile | 2 +-
> kernel/events/callchain.c | 182 +++++++++++++++++++++++++++++++++
> kernel/events/core.c | 237 +++++--------------------------------------
> 4 files changed, 217 insertions(+), 211 deletions(-)
> create mode 100644 kernel/events/callchain.c
>
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index 687f852..7978850 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -961,7 +961,6 @@ enum event_type_t {
> };
>
> #ifdef CONFIG_PERF_EVENTS
> -
> extern struct list_head pmus;
> extern int perf_pmu_register(struct pmu *pmu, char *name, int type);
> extern void perf_pmu_unregister(struct pmu *pmu);
> @@ -1201,6 +1200,12 @@ static inline void cpu_ctx_sched_in(struct perf_cpu_context *cpuctx,
> extern int
> task_function_call(struct task_struct *p, int (*func) (void *info), void *info);
> extern u64 perf_event_time(struct perf_event *event);
> +
> +extern int get_recursion_context(int *recursion);
> +extern inline void put_recursion_context(int *recursion, int rctx);
> +extern void put_callchain_buffers(void);
> +extern struct perf_callchain_entry *perf_callchain(struct pt_regs *regs);
> +extern int get_callchain_buffers(void);

I think it would be better to have these in a private kernel/events/events.h

Other than that, looks good, thanks.

Acked-by: Frederic Weisbecker <fweisbec@gmail.com>


\
 
 \ /
  Last update: 2011-05-11 18:15    [W:0.081 / U:0.152 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site