From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 4/7] x86: Replace print_symbol() with new %ps/%pS format
Date: Tue, 5 Nov 2013 10:52:29 +0000 [thread overview]
Message-ID: <5278CDED.1000604@citrix.com> (raw)
In-Reply-To: <5278DAB402000078000FF74C@nat28.tlf.novell.com>
On 05/11/13 10:47, Jan Beulich wrote:
>>>> On 04.11.13 at 22:30, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> --- a/xen/arch/x86/time.c
>> +++ b/xen/arch/x86/time.c
>> @@ -1475,8 +1475,7 @@ static int
>> _disable_pit_irq(void(*hpet_broadcast_setup)(void))
>> {
>> if ( xen_cpuidle > 0 )
>> {
>> - print_symbol("%s() failed, turning to PIT broadcast\n",
>> - (unsigned long)hpet_broadcast_setup);
>> + printk("hpet_broadcast_setup() failed, turning to PIT broadcast\n");
> You're losing information here - hpet_broadcast_setup is a pointer
> to a function.
So I am.
>
>> --- a/xen/common/timer.c
>> +++ b/xen/common/timer.c
>> @@ -511,9 +511,9 @@ s_time_t align_timer(s_time_t firsttick, uint64_t period)
>>
>> static void dump_timer(struct timer *t, s_time_t now)
>> {
>> - printk(" ex=%8"PRId64"us timer=%p cb=%p(%p)",
>> - (t->expires - now) / 1000, t, t->function, t->data);
>> - print_symbol(" %s\n", (unsigned long)t->function);
>> + printk(" ex=%8"PRId64"us timer=%p cb=%p(%p) %ps()\n",
>> + (t->expires - now) / 1000, t, t->function, t->data,
>> + _p(t->function));
> Do you really think printing t->function as raw _and_ as symbolic
> is worthwhile?
Probably not, especially given the new fallback behaviour upon failing
to find a symbol name
>
> Also, this isn't really x86 code...
>
> Jan
>
So it isn't. I shall split it into a patch on its own.
~Andrew
next prev parent reply other threads:[~2013-11-05 10:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 21:30 [PATCH v2 0/7] Printk symbol specifier Andrew Cooper
2013-11-04 21:30 ` [PATCH 1/7] common/vsprintf: Refactor string() out of vsnprintf() Andrew Cooper
2013-11-04 21:30 ` [PATCH 2/7] common/vsprintf: Refactor pointer() " Andrew Cooper
2013-11-05 10:21 ` Jan Beulich
2013-11-05 10:25 ` Andrew Cooper
2013-11-04 21:30 ` [PATCH 3/7] common/vsprintf: Add %ps and %pS format specifier support Andrew Cooper
2013-11-05 10:39 ` Ian Campbell
2013-11-05 10:43 ` Andrew Cooper
2013-11-05 10:40 ` Jan Beulich
2013-11-05 10:57 ` Andrew Cooper
2013-11-04 21:30 ` [PATCH 4/7] x86: Replace print_symbol() with new %ps/%pS format Andrew Cooper
2013-11-05 10:47 ` Jan Beulich
2013-11-05 10:52 ` Andrew Cooper [this message]
2013-11-05 11:14 ` Jan Beulich
2013-11-05 11:16 ` Andrew Cooper
2013-11-04 21:30 ` [PATCH 5/7] arm: " Andrew Cooper
2013-11-04 21:30 ` [PATCH 6/7] common/symbols: Remove print_symbol() and associated infrastructure Andrew Cooper
2013-11-04 21:30 ` [PATCH 7/7] Test harness for new printk formatting Andrew Cooper
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=5278CDED.1000604@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xenproject.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 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.