git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
oprofile
/
timer_int.c
diff --git
a/drivers/oprofile/timer_int.c
b/drivers/oprofile/timer_int.c
index
5f03189
..
710a45f
100644
(file)
--- a/
drivers/oprofile/timer_int.c
+++ b/
drivers/oprofile/timer_int.c
@@
-14,44
+14,33
@@
#include <linux/profile.h>
#include <linux/init.h>
#include <asm/ptrace.h>
#include <linux/profile.h>
#include <linux/init.h>
#include <asm/ptrace.h>
-
-static int timer_notify(struct notifier_block * self, unsigned long val, void * data)
+
+#include "oprof.h"
+
+static int timer_notify(struct pt_regs *regs)
{
{
- struct pt_regs * regs = (struct pt_regs *)data;
- int cpu = smp_processor_id();
- unsigned long eip = profile_pc(regs);
-
- oprofile_add_sample(eip, !user_mode(regs), 0, cpu);
+ oprofile_add_sample(regs, 0);
return 0;
}
return 0;
}
-
-
-static struct notifier_block timer_notifier = {
- .notifier_call = timer_notify,
-};
-
static int timer_start(void)
{
static int timer_start(void)
{
- return register_
profile_notifier(&timer_notifier
);
+ return register_
timer_hook(timer_notify
);
}
static void timer_stop(void)
{
}
static void timer_stop(void)
{
- unregister_
profile_notifier(&timer_notifier
);
+ unregister_
timer_hook(timer_notify
);
}
}
-static struct oprofile_operations timer_ops = {
- .start = timer_start,
- .stop = timer_stop,
- .cpu_type = "timer"
-};
-
-
-void __init timer_init(struct oprofile_operations ** ops)
+void __init oprofile_timer_init(struct oprofile_operations * ops)
{
{
- *ops = &timer_ops;
- printk(KERN_INFO "oprofile: using timer interrupt.\n");
+ ops->create_files = NULL;
+ ops->setup = NULL;
+ ops->shutdown = NULL;
+ ops->start = timer_start;
+ ops->stop = timer_stop;
+ ops->cpu_type = "timer";
}
}