Commit 3a67d0c3 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] oprofile: ARM infrastructure

From: Philippe Elie <phil.el@wanadoo.fr>

From: Zwane Mwaikambo <zwane@arm.linux.org.uk>

This patch adds infrastructure code and enables ARM to utilise the timer
int oprofile driver.  There is PMU code under development for the XScale
but that is still forthcoming.  In the meantime you can use the timer int
driver with an updated Oprofile-CVS userspace (SF is a bit slow, please
allow 24hrs).
parent 01d5c986
...@@ -639,6 +639,8 @@ source "drivers/media/Kconfig" ...@@ -639,6 +639,8 @@ source "drivers/media/Kconfig"
source "fs/Kconfig" source "fs/Kconfig"
source "arch/arm/oprofile/Kconfig"
source "drivers/video/Kconfig" source "drivers/video/Kconfig"
if ARCH_ACORN || ARCH_CLPS7500 || ARCH_TBOX || ARCH_SHARK || ARCH_SA1100 || PCI if ARCH_ACORN || ARCH_CLPS7500 || ARCH_TBOX || ARCH_SHARK || ARCH_SA1100 || PCI
......
...@@ -116,6 +116,7 @@ endif ...@@ -116,6 +116,7 @@ endif
core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/ drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/
drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/ drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/
......
...@@ -85,6 +85,9 @@ unsigned long long __attribute__((weak)) sched_clock(void) ...@@ -85,6 +85,9 @@ unsigned long long __attribute__((weak)) sched_clock(void)
*/ */
static inline void do_profile(struct pt_regs *regs) static inline void do_profile(struct pt_regs *regs)
{ {
profile_hook(regs);
if (!user_mode(regs) && if (!user_mode(regs) &&
prof_buffer && prof_buffer &&
current->pid) { current->pid) {
......
menu "Profiling support"
depends on EXPERIMENTAL
config PROFILING
bool "Profiling support (EXPERIMENTAL)"
help
Say Y here to enable the extended profiling support mechanisms used
by profilers such as OProfile.
config OPROFILE
tristate "OProfile system profiling (EXPERIMENTAL)"
depends on PROFILING
help
OProfile is a profiling system capable of profiling the
whole system, include the kernel, kernel modules, libraries,
and applications.
If unsure, say N.
endmenu
obj-$(CONFIG_OPROFILE) += oprofile.o
DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
oprof.o cpu_buffer.o buffer_sync.o \
event_buffer.o oprofile_files.o \
oprofilefs.o oprofile_stats.o \
timer_int.o )
oprofile-y := $(DRIVER_OBJS) init.o
/**
* @file init.c
*
* @remark Copyright 2004 Oprofile Authors
*
* @author Zwane Mwaikambo
*/
#include <linux/oprofile.h>
#include <linux/init.h>
#include <linux/errno.h>
int oprofile_arch_init(struct oprofile_operations **ops)
{
int ret = -ENODEV;
return ret;
}
void oprofile_arch_exit(void)
{
}
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/irq.h>
#include <linux/oprofile.h> #include <linux/oprofile.h>
#include <linux/profile.h> #include <linux/profile.h>
#include <linux/init.h> #include <linux/init.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment