From 273577165cd206d2d6689ee4b18aa13de1ec4bde Mon Sep 17 00:00:00 2001 From: Brian Rogan Date: Tue, 28 Mar 2006 01:56:20 -0800 Subject: [PATCH] Add oprofile_add_ext_sample On ppc64 we look at a profiling register to work out the sample address and if it was in userspace or kernel. The backtrace interface oprofile_add_sample does not allow this. Create oprofile_add_ext_sample and make oprofile_add_sample use it too. Signed-off-by: Anton Blanchard Cc: Philippe Elie Cc: John Levon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/oprofile.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux/oprofile.h') diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 559c4c38a9c7..b5b3197dfd4f 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h @@ -61,6 +61,16 @@ void oprofile_arch_exit(void); */ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event); +/** + * Add an extended sample. Use this when the PC is not from the regs, and + * we cannot determine if we're in kernel mode from the regs. + * + * This function does perform a backtrace. + * + */ +void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, + unsigned long event, int is_kernel); + /* 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-59-g8ed1b