2012-10-02 00:33:36

by David Sharp

[permalink] [raw]
Subject: Re: [PATCH v3 1/3] tracing,x86: add a TSC trace_clock

On Fri, Sep 28, 2012 at 8:15 PM, Steven Rostedt <[email protected]> wrote:
> On Thu, 2012-09-20 at 15:52 -0700, David Sharp wrote:
>
>> diff --git a/include/asm-generic/trace_clock.h b/include/asm-generic/trace_clock.h
>> new file mode 100644
>> index 0000000..6726f1b
>> --- /dev/null
>> +++ b/include/asm-generic/trace_clock.h
>> @@ -0,0 +1,16 @@
>> +#ifndef _ASM_GENERIC_TRACE_CLOCK_H
>> +#define _ASM_GENERIC_TRACE_CLOCK_H
>> +/*
>> + * Arch-specific trace clocks.
>> + */
>> +
>> +/*
>> + * Additional trace clocks added to the trace_clocks
>> + * array in kernel/trace/trace.c
>> + * None if the architecture has not defined it.
>> + */
>> +#ifndef ARCH_TRACE_CLOCKS
>> +# define ARCH_TRACE_CLOCKS
>> +#endif
>> +
>> +#endif /* _ASM_GENERIC_TRACE_CLOCK_H */
>
> Unfortunately this isn't enough. You need to add a stub in all
> arch/*/include/asm/ directories. That has:

Oh really? Okay. Sorry, I really don't know the mechanics of the arch
trees. I'll work on that now, and then send you a new series since I
forgot to send out my last update.

>
> --- trace_clock.h:
> #ifndef _ASM_TRACE_CLOCK_H
> #define _ASM_TRACE_CLOCK_H
>
> #include <asm-generic/trace_clock.h>
>
> #endif
> ---
>
>
> Because running this against my cross-compile test, failed on all archs
> but x86.
>
> -- Steve
>
>


2012-10-02 00:43:13

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH v3 1/3] tracing,x86: add a TSC trace_clock

On Mon, 2012-10-01 at 17:33 -0700, David Sharp wrote:

> > Unfortunately this isn't enough. You need to add a stub in all
> > arch/*/include/asm/ directories. That has:
>
> Oh really? Okay. Sorry, I really don't know the mechanics of the arch
> trees. I'll work on that now, and then send you a new series since I
> forgot to send out my last update.

It's a good idea to cross compile archs, especially if you make any
change that affects archs (like this one did).

Just use ktest.pl. You can download the cross tools at:

http://kernel.org/pub/tools/crosstool/files/bin/x86_64/

And you can use the example config file in:

tools/testing/ktest/examples/crosstests.conf

That's basically the test I use to test cross compiling of other archs.

-- Steve