[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/7] x86: Replace print_symbol() with new %ps/%pS format



>>> On 04.11.13 at 22:30, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 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.

> --- 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?

Also, this isn't really x86 code...

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.