From 54ebbe7ba51d97a28a9a406203d171d61858e4b9 Mon Sep 17 00:00:00 2001 From: Heinz Graalfs Date: Fri, 21 Jan 2011 10:06:54 +0000 Subject: oprofile: Introduce new oprofile sample add function (oprofile_add_ext_hw_sample) This patch introduces a new oprofile sample add function (oprofile_add_ext_hw_sample) that can also take task_struct as an argument, which is used by the hwsampler kernel module when copying hardware samples to OProfile buffers. Applied with following changes: * removed #include * whitespace changes * removed conditional compilation (CONFIG_HAVE_HWSAMPLER) * modified order of functions * fix missing function definition in header file Signed-off-by: Mahesh Salgaonkar Signed-off-by: Maran Pakkirisamy Signed-off-by: Heinz Graalfs Acked-by: Heiko Carstens Signed-off-by: Robert Richter --- include/linux/oprofile.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/oprofile.h') diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 1ca64113efe8..7f5cfd3b37dd 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h @@ -106,6 +106,13 @@ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, unsigned long event, int is_kernel); +/** + * Add an hardware sample. + */ +void oprofile_add_ext_hw_sample(unsigned long pc, struct pt_regs * const regs, + unsigned long event, int is_kernel, + struct task_struct *task); + /* Use this instead when the PC value is not from the regs. Doesn't * backtrace. */ void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event); -- cgit v1.2.3