Re: [PATCH] add TSC definitions for ia64

Mathieu Desnoyers <[email protected]> Fri, 16 May 2008 06:17:31 -0400
Newsgroups gmane.linux.kernel.tracing
Message-ID <20080516101731.GA4226@Krystal>
I will add it in my new LTTng release, thanks!

* Lai Jiangshan ([email protected]) wrote:
> 	I have revised the patch as you suggested and tested it.
> Here is the new patch: 
> Signed-off-by: Lai Jiangshan <[email protected]>
>
> diff -Nur linux-2.6-lttng.org/include/asm-ia64/ltt.h 
> linux-2.6-lttng/include/asm-ia64/ltt.h
> --- linux-2.6-lttng.org/include/asm-ia64/ltt.h	1970-01-01 
> 08:00:00.000000000 +0800
> +++ linux-2.6-lttng/include/asm-ia64/ltt.h	2008-05-16 14:33:04.000000000 
> +0800
> @@ -0,0 +1,42 @@
> +#ifndef _ASM_IA64_LTT_H
> +#define _ASM_IA64_LTT_H
> +
> +/*
> + * Copyright (C) Lai Jiangshan <[email protected]>
> + *               Mathieu Desnoyers <[email protected]>
> + *
> + * IA64 definitions for tracing system
> + */
> +
> +#include <linux/time.h>
> +#include <asm/timex.h>
> +#include <asm/processor.h>
> +
> +#define LTT_HAS_TSC
> +
> +static inline u32 ltt_get_timestamp32(void)
> +{
> +	return get_cycles();
> +}
> +
> +static inline u64 ltt_get_timestamp64(void)
> +{
> +	return get_cycles();
> +}
> +
> +static inline void ltt_add_timestamp(unsigned long ticks)
> +{
> +}
> +
> +static inline unsigned long long ltt_frequency(void)
> +{
> +	return local_cpu_data->itc_freq;
> +}
> +
> +static inline u32 ltt_freq_scale(void)
> +{
> +	return 1;
> +}
> +
> +#endif /* _ASM_IA64_LTT_H */
> +
>

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68