From: Ralf Baechle <ralf@linux-mips.org>
To: Dajie Tan <jiankemeng@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>,
phil.el@wanadoo.fr, levon@movementarian.org,
oprofile-list@lists.sourceforge.net
Subject: Re: [PATCH] Add support for profiling Loongson 2E
Date: Tue, 24 Jul 2007 15:40:51 +0100 [thread overview]
Message-ID: <20070724144051.GA17256@linux-mips.org> (raw)
In-Reply-To: <5861a7880707240220g5d8129anc95e10bea833e323@mail.gmail.com>
On Tue, Jul 24, 2007 at 01:20:27PM +0400, Dajie Tan wrote:
> This patch adds support for profiling Loongson 2E. It's been tested on
> FuLong mini PC(loongson2e inside).
First of all, your patch has been garbled when mailing.
[.. Lots of arch/mips code deleted ...]
No complaints upto this point. But:
> diff -urN b/drivers/oprofile/cpu_buffer.c a/drivers/oprofile/cpu_buffer.c
> --- b/drivers/oprofile/cpu_buffer.c 2007-07-24 13:00:54.000000000 +0800
> +++ a/drivers/oprofile/cpu_buffer.c 2007-07-19 08:22:15.000000000 +0800
> @@ -148,6 +148,10 @@
> unsigned long pc, unsigned long event)
> {
> struct op_sample * entry = &cpu_buf->buffer[cpu_buf->head_pos];
> +
> + if(!entry)
> + return;
> +
> entry->eip = pc;
> entry->event = event;
> increment_head(cpu_buf);
Why do you need this change? It almost looks as if you're papering over
a bug where add_sample should not be called at all.
Ralf
next prev parent reply other threads:[~2007-07-24 14:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 9:20 [PATCH] Add support for profiling Loongson 2E Dajie Tan
2007-07-24 14:40 ` Ralf Baechle [this message]
2007-07-25 3:41 ` Dajie Tan
2007-07-25 12:52 ` John Levon
2007-07-26 1:14 ` Dajie Tan
2007-07-26 4:48 ` Fuxin Zhang
2007-07-26 11:17 ` Ralf Baechle
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=20070724144051.GA17256@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=jiankemeng@gmail.com \
--cc=levon@movementarian.org \
--cc=linux-mips@linux-mips.org \
--cc=oprofile-list@lists.sourceforge.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox