Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: anemo@mba.ocn.ne.jp
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org,
	Franck Bui-Huu <vagabon.xyz@gmail.com>
Subject: [PATCH 4/7] Make frame_info_init() more readable.
Date: Thu,  3 Aug 2006 09:29:18 +0200	[thread overview]
Message-ID: <11545901612879-git-send-email-vagabon.xyz@gmail.com> (raw)
In-Reply-To: <11545901611096-git-send-email-vagabon.xyz@gmail.com>

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
---
 arch/mips/kernel/process.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 93d5432..da332d7 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -370,15 +370,15 @@ #else
 	mfinfo[0].func = schedule;
 	schedule_frame = &mfinfo[0];
 #endif
-	for (i = 0; i < ARRAY_SIZE(mfinfo) && mfinfo[i].func; i++) {
-		struct mips_frame_info *info = &mfinfo[i];
-		if (get_frame_info(info)) {
-			/* leaf or unknown */
-			if (info->func == schedule)
-				printk("Can't analyze prologue code at %p\n",
-				       info->func);
-		}
-	}
+	for (i = 0; i < ARRAY_SIZE(mfinfo) && mfinfo[i].func; i++)
+		get_frame_info(mfinfo + i);
+
+	/*
+	 * Without schedule() frame info, result given by
+	 * thread_saved_pc() and get_wchan() are not reliable.
+	 */
+	if (schedule_frame->pc_offset < 0)
+		printk("Can't analyze schedule() prologue at %p\n", schedule);
 
 	mfinfo_num = i;
 	return 0;
-- 
1.4.2.rc2

  parent reply	other threads:[~2006-08-03  7:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-03  7:29 [PATCH 0/7] Improve prologue analysis code (take #2) Franck Bui-Huu
2006-08-03  7:29 ` [PATCH 1/7] Make get_frame_info() more readable Franck Bui-Huu
2006-08-03  7:29 ` [PATCH 2/7] Remove unused MODULE_RANGE macro Franck Bui-Huu
2006-08-03  7:29 ` [PATCH 3/7] Miscellaneous cleanup in prologue analysis code Franck Bui-Huu
2006-08-03  7:29 ` Franck Bui-Huu [this message]
2006-08-03  7:29 ` [PATCH 5/7] Simplify dump_stack() Franck Bui-Huu
2006-08-03  7:29 ` [PATCH 6/7] Make get_frame_info() more robust Franck Bui-Huu
2006-08-03  7:29 ` [PATCH 7/7] Improve unwind_stack() Franck Bui-Huu
2006-08-03 14:14 ` [PATCH 0/7] Improve prologue analysis code (take #2) Atsushi Nemoto
2006-08-03 15:58 ` 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=11545901612879-git-send-email-vagabon.xyz@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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