Commit 8404d51c authored by Greg Banks's avatar Greg Banks Committed by Linus Torvalds

[PATCH] oprofile: backtrace operation does not initialized

Allow stack tracing to work when sampling on timer is forced using the
timer=1 boot option.  Reported by Akinobu Mita.
Signed-off-by: default avatarGreg Banks <gnb@melbourne.sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 729719d3
...@@ -155,13 +155,11 @@ static int __init oprofile_init(void) ...@@ -155,13 +155,11 @@ static int __init oprofile_init(void)
{ {
int err = 0; int err = 0;
/* this is our fallback case */ oprofile_arch_init(&oprofile_ops);
oprofile_timer_init(&oprofile_ops);
if (timer) { if (timer) {
printk(KERN_INFO "oprofile: using timer interrupt.\n"); printk(KERN_INFO "oprofile: using timer interrupt.\n");
} else { oprofile_timer_init(&oprofile_ops);
oprofile_arch_init(&oprofile_ops);
} }
err = oprofilefs_register(); err = oprofilefs_register();
......
...@@ -37,6 +37,9 @@ static void timer_stop(void) ...@@ -37,6 +37,9 @@ static void timer_stop(void)
void __init oprofile_timer_init(struct oprofile_operations * ops) void __init oprofile_timer_init(struct oprofile_operations * ops)
{ {
ops->create_files = NULL;
ops->setup = NULL;
ops->shutdown = NULL;
ops->start = timer_start; ops->start = timer_start;
ops->stop = timer_stop; ops->stop = timer_stop;
ops->cpu_type = "timer"; ops->cpu_type = "timer";
......
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