aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/oprofile.h
diff options
context:
space:
mode:
authorHeinz Graalfs <graalfs@linux.vnet.ibm.com>2011-01-21 05:06:54 -0500
committerRobert Richter <robert.richter@amd.com>2011-02-15 05:07:07 -0500
commit54ebbe7ba51d97a28a9a406203d171d61858e4b9 (patch)
tree529982f17aa0aba84a310261be0773f68f4337b1 /include/linux/oprofile.h
parentd14dd7e20d5e526557f5d3cfef4046a642f80924 (diff)
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 <linux/module.h> * whitespace changes * removed conditional compilation (CONFIG_HAVE_HWSAMPLER) * modified order of functions * fix missing function definition in header file Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Maran Pakkirisamy <maranp@linux.vnet.ibm.com> Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'include/linux/oprofile.h')
-rw-r--r--include/linux/oprofile.h7
1 files changed, 7 insertions, 0 deletions
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);
106void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, 106void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
107 unsigned long event, int is_kernel); 107 unsigned long event, int is_kernel);
108 108
109/**
110 * Add an hardware sample.
111 */
112void oprofile_add_ext_hw_sample(unsigned long pc, struct pt_regs * const regs,
113 unsigned long event, int is_kernel,
114 struct task_struct *task);
115
109/* Use this instead when the PC value is not from the regs. Doesn't 116/* Use this instead when the PC value is not from the regs. Doesn't
110 * backtrace. */ 117 * backtrace. */
111void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event); 118void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event);