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>
This commit is contained in:
parent
d14dd7e20d
commit
54ebbe7ba5
2 changed files with 24 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue