[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Recent trace patch not arch-neutral
On Mon, Oct 31, 2005 at 04:26:19PM -0700, Rob Gardner wrote: > Rob Gardner wrote: > > > > >Now, to answer Dan's question- the rdtscll thing is just a time stamp > >counter, expressed in cycles. So on ia64 you could probably replace it > >with an asm statement to read ar.itc to make everything work. We just > >need a little wrapper to do the right thing for each architecture. Now > >Dan, if you were more conveniently located, perhaps we could work > >together and fix this. ;) > > > > I imagine we just need something that looks like this in trace.c: > > #ifdef x86 > rdtscll(rec->cycles); > #endif > #ifdef IA64 > __asm__ __volatile ("mov %0=ar.itc;;" : "=r"(rec->cycles) :: > "memory"); > #endif Can we please stick with the Linux method and put such arch dependant ifdefs in headers and not in .c files? e.g. define a cycle_counter() or somesuch inline function that expands to the right thing for each arch and put it in asm-arch/... Otherwise, it gets messy very quickly with the addition of new architectures. Cheers, Muli -- Muli Ben-Yehuda http://www.mulix.org | http://mulix.livejournal.com/ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |