diff options
author | Aaro Koskinen <aaro.koskinen@nsn.com> | 2014-10-17 15:10:25 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 06:45:31 (GMT) |
commit | 1b48142a809ee03f48979fad647245dbe0ce423a (patch) | |
tree | 464f7ed511ec30fc7eec78c595c042b0b2dc9db8 | |
parent | 26b40ef1aa138599af223d08b73fd5d960fdabf7 (diff) | |
download | linux-1b48142a809ee03f48979fad647245dbe0ce423a.tar.xz |
MIPS: oprofile: Enable backtrace on timer-based profiling
Allow unsupported CPU types to use backtrace with timer-based profiling.
Some CPUs (notably OCTEON) lack architecture-specific oprofile driver. In
such case oprofile can fallback to timer-based mode, and arch code can
still provide the backtrace functionality. So just set up the backtrace
hook always.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8108/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/oprofile/common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index feb9879..a26cbe3 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c @@ -110,6 +110,12 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) break; }; + /* + * Always set the backtrace. This allows unsupported CPU types to still + * use timer-based oprofile. + */ + ops->backtrace = op_mips_backtrace; + if (!lmodel) return -ENODEV; @@ -125,7 +131,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) ops->start = op_mips_start; ops->stop = op_mips_stop; ops->cpu_type = lmodel->cpu_type; - ops->backtrace = op_mips_backtrace; printk(KERN_INFO "oprofile: using %s performance monitoring.\n", lmodel->cpu_type); |