From: Jean Delvare <khali@linux-fr.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stop ==== emergency
Date: Mon, 6 Feb 2006 19:55:04 +0100 [thread overview]
Message-ID: <20060206195504.16b60b93.khali@linux-fr.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0602060841540.6574@goblin.wat.veritas.com>
Hi Hugh, Pete,
> > This is wrong, Hugh. What do you think the priority of the second printk?
> > It's not log_lvl, that's for sure.
>
> Are you sure? I've not delved into the printk code itself, but this
> does follow the same pattern as in show_stack_log_lvl itself e.g. its
> "Call Trace:\n" line. (I am assuming print_context_stack ends with a
> newline, as it does.)
The code was correct (and was applied already as far as I can see.)
However, given that printk calls aren't exactly cheap, don't we want to
merge them where possible?
Merge a few printk calls in i386 traps.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
arch/i386/kernel/traps.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--- linux-2.6.16-rc2.orig/arch/i386/kernel/traps.c 2006-02-06 07:50:57.000000000 +0100
+++ linux-2.6.16-rc2/arch/i386/kernel/traps.c 2006-02-06 19:42:10.000000000 +0100
@@ -114,8 +114,7 @@
static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
{
- printk(log_lvl);
- printk(" [<%08lx>] ", addr);
+ printk("%s [<%08lx>] ", log_lvl, addr);
print_symbol("%s", addr);
printk("\n");
}
@@ -166,8 +165,7 @@
stack = (unsigned long*)context->previous_esp;
if (!stack)
break;
- printk(log_lvl);
- printk(" =======================\n");
+ printk("%s =======================\n", log_lvl);
}
}
@@ -196,14 +194,12 @@
break;
if (i && ((i % 8) == 0)) {
printk("\n");
- printk(log_lvl);
- printk(" ");
+ printk("%s ", log_lvl);
}
printk("%08lx ", *stack++);
}
printk("\n");
- printk(log_lvl);
- printk("Call Trace:\n");
+ printk("%sCall Trace:\n", log_lvl);
show_trace_log_lvl(task, esp, log_lvl);
}
More merges are possible, but I'm not sure how far we want to go.
Thanks,
--
Jean Delvare
next prev parent reply other threads:[~2006-02-06 18:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1139006040.12873.linux-kernel2news@redhat.com>
2006-02-06 4:57 ` [PATCH] stop ==== emergency Pete Zaitcev
2006-02-06 8:46 ` Hugh Dickins
2006-02-06 18:55 ` Jean Delvare [this message]
2006-02-06 21:11 ` Hugh Dickins
2006-02-06 21:32 ` Pete Zaitcev
2006-02-06 22:15 ` Hugh Dickins
2006-02-03 21:37 Hugh Dickins
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=20060206195504.16b60b93.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zaitcev@redhat.com \
/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