public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: mita@miraclelinux.com (Akinobu Mita)
To: ak@suse.de, linux-kernel@vger.kernel.org
Cc: Chuck Ebbert <76306.1226@compuserve.com>,
	Christoph Hellwig <hch@infradead.org>,
	Jesper Juhl <jesper.juhl@gmail.com>,
	Arjan van de Ven <arjan@infradead.org>
Subject: [PATCH 1/4] makes print_symbol() return int
Date: Tue, 17 Jan 2006 19:14:22 +0900	[thread overview]
Message-ID: <20060117101422.GB19473@miraclelinux.com> (raw)
In-Reply-To: <20060117101339.GA19473@miraclelinux.com>

Use print_symbol() to dump call trace on x86-64.

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
----

 traps.c |   29 +++++++----------------------
 1 files changed, 7 insertions(+), 22 deletions(-)

--- 2.6-git/arch/x86_64/kernel/traps.c.orig	2006-01-16 22:05:38.000000000 +0900
+++ 2.6-git/arch/x86_64/kernel/traps.c	2006-01-16 22:07:36.000000000 +0900
@@ -30,6 +30,7 @@
 #include <linux/moduleparam.h>
 #include <linux/nmi.h>
 #include <linux/kprobes.h>
+#include <linux/kallsyms.h> 
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -92,30 +93,14 @@ static inline void conditional_sti(struc
 
 static int kstack_depth_to_print = 10;
 
-#ifdef CONFIG_KALLSYMS
-#include <linux/kallsyms.h> 
-int printk_address(unsigned long address)
-{ 
-	unsigned long offset = 0, symsize;
-	const char *symname;
-	char *modname;
-	char *delim = ":"; 
-	char namebuf[128];
-
-	symname = kallsyms_lookup(address, &symsize, &offset, &modname, namebuf); 
-	if (!symname) 
-		return printk("[<%016lx>]", address);
-	if (!modname) 
-		modname = delim = ""; 		
-        return printk("<%016lx>{%s%s%s%s%+ld}",
-		      address,delim,modname,delim,symname,offset); 
-} 
-#else
 int printk_address(unsigned long address)
 { 
-	return printk("[<%016lx>]", address);
-} 
-#endif
+	int len;
+
+	len = printk("<%016lx>", address);
+	len += print_symbol(" %s", address);
+	return len;
+}
 
 static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
 					unsigned *usedp, const char **idp)

  reply	other threads:[~2006-01-17 10:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-17 10:13 [PATCH 0/4] compact call trace Akinobu Mita
2006-01-17 10:14 ` Akinobu Mita [this message]
2006-01-17 10:15 ` [PATCH 2/4] x86-64: Use print_symbol() to dump " Akinobu Mita
2006-01-17 10:15 ` [PATCH 3/4] compact print_symbol() output Akinobu Mita
2006-01-17 10:34   ` Keith Owens
2006-01-17 10:52     ` Jesper Juhl
2006-01-17 10:58       ` Akinobu Mita
2006-01-17 11:01         ` Keith Owens
2006-01-17 11:23     ` Akinobu Mita
2006-01-17 15:01       ` Hugh Dickins
2006-01-17 15:01         ` Andi Kleen
2006-01-17 10:16 ` [PATCH 4/4] i386: print system_utsname.version in oops Akinobu Mita
2006-01-17 10:31 ` [PATCH 0/4] compact call trace Arjan van de Ven
2006-01-17 10:42   ` Keith Owens

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=20060117101422.GB19473@miraclelinux.com \
    --to=mita@miraclelinux.com \
    --cc=76306.1226@compuserve.com \
    --cc=ak@suse.de \
    --cc=arjan@infradead.org \
    --cc=hch@infradead.org \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.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