From: Greg Banks <gnb@sgi.com>
To: John Levon <levon@movementarian.org>
Cc: Greg Banks <gnb@sgi.com>, Philippe Elie <phil.el@wanadoo.fr>,
Akinobu Mita <amgta@yacht.ocn.ne.jp>,
linux-kernel@vger.kernel.org
Subject: Re: [mm patch] oprofile: backtrace operation does not initialized
Date: Thu, 9 Dec 2004 12:50:24 +1100 [thread overview]
Message-ID: <20041209015024.GG4239@sgi.com> (raw)
In-Reply-To: <20041209014622.GB48804@compsoc.man.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
On Thu, Dec 09, 2004 at 01:46:22AM +0000, John Levon wrote:
> On Thu, Dec 09, 2004 at 11:39:06AM +1100, Greg Banks wrote:
>
> > But for now I don't see any drama with leaving in the ->setup() and
> > ->shutdown() methods when rewriting the ops structure. Ditto for
> > the ->create_files() methods.
>
> Wouldn't this mean that we try to set up the NMI stuff regardless of
> forcing the timer ? I can imagine a flaky system where somebody needs to
> avoid going near that stuff.
>
> timer_init() making sure to set all fields seems reasonable to me. Or
> oprofile_init() could grab ->backtrace, memset the structure, then
> replace ->backtrace...
Ok, how about this patch?
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
[-- Attachment #2: oprofile-timer-backtrace-fix-2 --]
[-- Type: text/plain, Size: 1429 bytes --]
Allow stack tracing to work when sampling on timer is forced
using the timer=1 boot option. Reported by Akinobu Mita.
Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
---
oprof.c | 6 ++----
timer_int.c | 3 +++
2 files changed, 5 insertions(+), 4 deletions(-)
Index: linux/drivers/oprofile/oprof.c
===================================================================
--- linux.orig/drivers/oprofile/oprof.c 2004-12-04 19:43:37.%N +1100
+++ linux/drivers/oprofile/oprof.c 2004-12-09 09:25:02.%N +1100
@@ -155,13 +155,11 @@ static int __init oprofile_init(void)
{
int err = 0;
- /* this is our fallback case */
- oprofile_timer_init(&oprofile_ops);
+ oprofile_arch_init(&oprofile_ops);
if (timer) {
printk(KERN_INFO "oprofile: using timer interrupt.\n");
- } else {
- oprofile_arch_init(&oprofile_ops);
+ oprofile_timer_init(&oprofile_ops);
}
err = oprofilefs_register();
Index: linux/drivers/oprofile/timer_int.c
===================================================================
--- linux.orig/drivers/oprofile/timer_int.c 2004-12-04 19:43:37.%N +1100
+++ linux/drivers/oprofile/timer_int.c 2004-12-09 12:48:52.%N +1100
@@ -37,6 +37,9 @@ static void timer_stop(void)
void __init oprofile_timer_init(struct oprofile_operations * ops)
{
+ ops->create_files = NULL;
+ ops->setup = NULL;
+ ops->shutdown = NULL;
ops->start = timer_start;
ops->stop = timer_stop;
ops->cpu_type = "timer";
next prev parent reply other threads:[~2004-12-09 1:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-08 9:30 [mm patch] oprofile: backtrace operation does not initialized Akinobu Mita
2004-12-08 9:34 ` Akinobu Mita
2004-12-08 11:13 ` Ingo Molnar
2004-12-08 11:37 ` Akinobu Mita
2004-12-08 16:00 ` John Levon
2004-12-08 22:31 ` Greg Banks
2004-12-08 23:56 ` Philippe Elie
2004-12-09 0:39 ` Greg Banks
2004-12-09 1:46 ` John Levon
2004-12-09 1:50 ` Greg Banks [this message]
2004-12-09 2:23 ` John Levon
2004-12-09 14:22 ` Akinobu Mita
2004-12-09 14:53 ` Akinobu Mita
2004-12-09 14:55 ` John Levon
2004-12-09 15:27 ` Greg Banks
2004-12-09 15:23 ` Greg Banks
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=20041209015024.GG4239@sgi.com \
--to=gnb@sgi.com \
--cc=amgta@yacht.ocn.ne.jp \
--cc=levon@movementarian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phil.el@wanadoo.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.