[ltt-dev] [PATCH] sh: added LTT_DUMP_TABLES support

Mathieu Desnoyers compudj at krystal.dyndns.org
Fri Jul 31 11:50:48 EDT 2009


* Giuseppe CAVALLARO (peppe.cavallaro at st.com) wrote:
> Only support syscall descriptor table listening
> for SUPERH32.
> 

Merged in LTTng 0.154, thanks !

So now we only need to fix entry-common.S to get everything working.

Mathieu

> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro at st.com>
> ---
>  arch/sh/Kconfig            |    1 +
>  arch/sh/kernel/ptrace_32.c |   24 ++++++++++++++++++++++++
>  2 files changed, 25 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index 1222328..80a466f 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -32,6 +32,7 @@ config SUPERH32
>  	select HAVE_DYNAMIC_FTRACE
>  	select HAVE_ARCH_KGDB
>  	select ARCH_HIBERNATION_POSSIBLE if MMU
> +	select HAVE_LTT_DUMP_TABLES
>  
>  config SUPERH64
>  	def_bool ARCH = "sh64"
> diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
> index 1835fd1..fc1b58f 100644
> --- a/arch/sh/kernel/ptrace_32.c
> +++ b/arch/sh/kernel/ptrace_32.c
> @@ -26,6 +26,9 @@
>  #include <linux/tracehook.h>
>  #include <linux/elf.h>
>  #include <linux/regset.h>
> +#include <linux/module.h>
> +#include <linux/kallsyms.h>
> +#include <linux/marker.h>
>  #include <trace/syscall.h>
>  #include <asm/uaccess.h>
>  #include <asm/pgtable.h>
> @@ -34,10 +37,31 @@
>  #include <asm/mmu_context.h>
>  #include <asm/syscalls.h>
>  #include <asm/fpu.h>
> +#include <asm/unistd.h>
>  
>  DEFINE_TRACE(syscall_entry);
>  DEFINE_TRACE(syscall_exit);
>  
> +extern unsigned long sys_call_table[];
> +void ltt_dump_sys_call_table(void *call_data)
> +{
> +	int i;
> +	char namebuf[KSYM_NAME_LEN];
> +
> +	for (i = 0; i < NR_syscalls; i++) {
> +		sprint_symbol(namebuf, sys_call_table[i]);
> +		__trace_mark(0, syscall_state, sys_call_table, call_data,
> +			"id %d address %p symbol %s",
> +			i, (void *)sys_call_table[i], namebuf);
> +	}
> +}
> +EXPORT_SYMBOL_GPL(ltt_dump_sys_call_table);
> +
> +void ltt_dump_idt_table(void *call_data)
> +{
> +}
> +EXPORT_SYMBOL_GPL(ltt_dump_idt_table);
> +
>  /*
>   * This routine will get a word off of the process kernel stack.
>   */
> -- 
> 1.6.0.4
> 
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

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




More information about the lttng-dev mailing list