From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: oprofile: Always allow backtraces
Date: Thu, 20 Jan 2011 10:02:30 -0000 [thread overview]
Message-ID: <000601cbb889$26887ae0$739970a0$@deacon@arm.com> (raw)
In-Reply-To: <20110120095239.GT21401@erda.amd.com>
Hi Robert,
> I would like to go even further, see the diff below.
[...]
> +#else
> +
> +static int oprofile_arch_init(struct oprofile_operations *ops)
> +{
> + pr_info("oprofile: hardware counters not available\n");
> + return -ENODEV;
> +}
> +
> +static void oprofile_arch_exit(void) { }
> +
> +#endif /* CONFIG_HW_PERF_EVENTS */
Don't we now have oprofile_arch_init defined twice in the non-PMU
case? (and one of these definitions is __init)?
> static void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
> {
> struct frame_tail *tail = ((struct frame_tail *) regs->ARM_fp) - 1;
> @@ -111,6 +123,7 @@ static void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
>
> int __init oprofile_arch_init(struct oprofile_operations *ops)
> {
> + /* provide backtrace support also in timer mode: */
> ops->backtrace = arm_backtrace;
Right, so this becomes common code but we need to ensure that we
don't call oprofile_perf_init. I suppose an alternative would be
to provide an empty static inline stub for oprofile_perf_init
instead.
Will
next prev parent reply other threads:[~2011-01-20 10:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 20:54 [PATCH] ARM: oprofile: Always allow backtraces Ari Kauppi
2011-01-20 9:42 ` Will Deacon
2011-01-20 9:52 ` Robert Richter
2011-01-20 9:57 ` Robert Richter
2011-01-20 10:02 ` Will Deacon [this message]
2011-01-20 10:17 ` Ari Kauppi
2011-01-20 10:46 ` Robert Richter
2011-01-20 12:31 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000601cbb889$26887ae0$739970a0$@deacon@arm.com' \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).