mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-25 02:48:21 +00:00
fa0ebff62a
Patch from Richard Purdie Add functions to generate backtraces of both kernel and user processes which allows oprofile's call graphing functionality to be used on arm. This requires unstripped binaries/libs which use a frame pointer. Signed-off-by: Richard Purdie Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
34 lines
525 B
C
34 lines
525 B
C
/**
|
|
* @file init.c
|
|
*
|
|
* @remark Copyright 2004 Oprofile Authors
|
|
* @remark Read the file COPYING
|
|
*
|
|
* @author Zwane Mwaikambo
|
|
*/
|
|
|
|
#include <linux/oprofile.h>
|
|
#include <linux/init.h>
|
|
#include <linux/errno.h>
|
|
#include "op_arm_model.h"
|
|
|
|
int __init oprofile_arch_init(struct oprofile_operations *ops)
|
|
{
|
|
int ret = -ENODEV;
|
|
|
|
#ifdef CONFIG_CPU_XSCALE
|
|
ret = pmu_init(ops, &op_xscale_spec);
|
|
#endif
|
|
|
|
ops->backtrace = arm_backtrace;
|
|
|
|
return ret;
|
|
}
|
|
|
|
void oprofile_arch_exit(void)
|
|
{
|
|
#ifdef CONFIG_CPU_XSCALE
|
|
pmu_exit();
|
|
#endif
|
|
}
|