All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Recent trace patch not arch-neutral
@ 2005-10-31 22:18 Ian Pratt
  2005-10-31 23:03 ` Rob Gardner
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Pratt @ 2005-10-31 22:18 UTC (permalink / raw)
  To: Magenheimer, Dan (HP Labs Fort Collins), xen-devel

> A recent patch to trace.c uses a call to rdtscll() which is 
> x86-specific.  Is there an arch-neutral call that can be used 
> instead?  Or do arch's need to implement this?  (And if the 
> latter, should we choose a more generic name?)

The tracebuffer code has always used the cycle counter, so if you've
previously been compiling it for ia64 it must have previously been using
some more arch neutral way of accessing it...

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Recent trace patch not arch-neutral
@ 2005-11-02 17:47 Magenheimer, Dan (HP Labs Fort Collins)
  0 siblings, 0 replies; 12+ messages in thread
From: Magenheimer, Dan (HP Labs Fort Collins) @ 2005-11-02 17:47 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Ian Pratt, xen-devel, Gardner, Robert D

> > How about just adding "#include <asm/timex.h>" and
> > stealing linux/include/asm-{i386,x86_64}/timex.h?
> > Xen/ia64 is already including asm-ia64/timex.h
> > in other code.
> 
> Including asm/timex.h from asm/time.h sounds like the best fix for 
> xen/ia64 then.

Yep, looks like that works fine.  Will include
this in the next ia64 pull.

Thanks,
Dan

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Recent trace patch not arch-neutral
@ 2005-11-01 13:25 Magenheimer, Dan (HP Labs Fort Collins)
  2005-11-01 13:59 ` Keir Fraser
  0 siblings, 1 reply; 12+ messages in thread
From: Magenheimer, Dan (HP Labs Fort Collins) @ 2005-11-01 13:25 UTC (permalink / raw)
  To: Keir Fraser, Gardner, Robert D; +Cc: Ian Pratt, xen-devel

How about just adding "#include <asm/timex.h>" and
stealing linux/include/asm-{i386,x86_64}/timex.h?
Xen/ia64 is already including asm-ia64/timex.h
in other code.

> -----Original Message-----
> From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] 
> Sent: Tuesday, November 01, 2005 2:28 AM
> To: Gardner, Robert D
> Cc: xen-devel@lists.xensource.com; Magenheimer, Dan (HP Labs 
> Fort Collins); Ian Pratt
> Subject: Re: [Xen-devel] Recent trace patch not arch-neutral
> 
> 
> >  #ifdef x86
> >         rdtscll(rec->cycles);
> >  #endif
> >  #ifdef IA64
> >         __asm__ __volatile ("mov %0=ar.itc;;" : 
> "=r"(rec->cycles) :: 
> > "memory");
> >  #endif
> >
> >  Dan, perhaps you know the nice clean way of doing this 
> sort of thing?
> 
> Okay, let's define the Linux function get_cycles() in 
> include/asm/time.h. So common code can then get at that generic 
> function by including <xen/time.h>. I don't much care for the 
> cycles_t 
> definition but I guess we may as well pull that in as well. Then 
> trace.c can cast to u64 when writing the stamp into the trace record.
> 
>   -- Keir
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Recent trace patch not arch-neutral
@ 2005-10-31 22:32 Magenheimer, Dan (HP Labs Fort Collins)
  0 siblings, 0 replies; 12+ messages in thread
From: Magenheimer, Dan (HP Labs Fort Collins) @ 2005-10-31 22:32 UTC (permalink / raw)
  To: xen-devel

> > A recent patch to trace.c uses a call to rdtscll() which is 
> > x86-specific.  Is there an arch-neutral call that can be used 
> > instead?  Or do arch's need to implement this?  (And if the 
> > latter, should we choose a more generic name?)
> 
> The tracebuffer code has always used the cycle counter, so if you've
> previously been compiling it for ia64 it must have previously 
> been using
> some more arch neutral way of accessing it...

OK, from the hg annotated manifest it appeared (on first
glance) to be recently added.

Still not positive, but I think Xen/ia64 was compiling but
never linking in trace.c because the call from dom0_ops.c
to tb_control was controlled by #ifdef TRACE_BUFFER,
that ifdef is now gone, and Xen/ia64 never turned it on.

Looking quickly over trace.c, all appears to be arch-neutral
except for the call to rdtscll(), so the questions remain...

Is there an arch-neutral call that can be used 
instead?  Or do arch's need to implement this?  (And if the 
latter, should we choose a more generic name?)

Dan

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Recent trace patch not arch-neutral
@ 2005-10-31 21:33 Magenheimer, Dan (HP Labs Fort Collins)
  0 siblings, 0 replies; 12+ messages in thread
From: Magenheimer, Dan (HP Labs Fort Collins) @ 2005-10-31 21:33 UTC (permalink / raw)
  To: xen-devel

A recent patch to trace.c uses a call to rdtscll()
which is x86-specific.  Is there an arch-neutral call
that can be used instead?  Or do arch's need to
implement this?  (And if the latter, should we choose
a more generic name?)

Thanks,
Dan

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-11-02 17:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-31 22:18 Recent trace patch not arch-neutral Ian Pratt
2005-10-31 23:03 ` Rob Gardner
2005-10-31 23:26   ` Rob Gardner
2005-11-01  6:18     ` Muli Ben-Yehuda
2005-11-01  6:38       ` Rob Gardner
2005-11-01  6:45         ` Muli Ben-Yehuda
2005-11-01  9:27     ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2005-11-02 17:47 Magenheimer, Dan (HP Labs Fort Collins)
2005-11-01 13:25 Magenheimer, Dan (HP Labs Fort Collins)
2005-11-01 13:59 ` Keir Fraser
2005-10-31 22:32 Magenheimer, Dan (HP Labs Fort Collins)
2005-10-31 21:33 Magenheimer, Dan (HP Labs Fort Collins)

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.