[ltt-dev] LTTng for SH

Mathieu Desnoyers compudj at krystal.dyndns.org
Thu Jul 30 10:03:12 EDT 2009

* Giuseppe CAVALLARO (peppe.cavallaro at st.com) wrote:
> Hash: SHA1
> Hi Mathieu,
> I restarted looking at LTT for SH.
> As you probably remember, I tried to help the community to test and port
> it on SH some years ago.
> Unfortunately, I stopped working on it because the support in STLinux
> kernel was stable enough but aligned to an old kernel version (2.6.23
> series).
> Today morning, I was able to build the kernel 2.6.30 for SH and no
> problems runs it on an ST Box (based on SH4-200 and SH4-300).
> Indeed, I've not done many tests but I'm going to keep-you informed
> about my development on LTT for SH.
> The patches, I've just sent to the mailing list, only fixes some
> problems raised while compiling.

Thanks for looking into this, it's always very appreciated.

> I've also tried to follow the mailing list, but in background, during
> this time. So, I kindly ask you to update me (with brief summary) of the
> missing support I could add for SH (maybe he syscall listing ...).

Yes, syscall and interrupt descriptor table listing would be great. You
can look arch/x86/kernel/syscall_64.c for an example:

void ltt_dump_sys_call_table(void *call_data)
        int i;
        char namebuf[KSYM_NAME_LEN];

        for (i = 0; i < __NR_syscall_max + 1; i++) {
                sprint_symbol(namebuf, (unsigned long)sys_call_table[i]);
                __trace_mark(0, syscall_state, sys_call_table,
                        "id %d address %p symbol %s",
                        i, (void*)sys_call_table[i], namebuf);

and irq handler vector from arch/x86/kernel/traps.c:

void ltt_dump_idt_table(void *call_data)
        int i;
        char namebuf[KSYM_NAME_LEN];

        for (i = 0; i < IDT_ENTRIES; i++) {
                unsigned long address = gate_offset(idt_table[i]);
                sprint_symbol(namebuf, address);
                __trace_mark(0, irq_state, idt_table, call_data,
                        "irq %d address %p symbol %s",
                        i, (void *)address, namebuf);

We have, in include/linux/ltt-tracer.h:

extern void ltt_dump_sys_call_table(void *call_data);
extern void ltt_dump_idt_table(void *call_data);
static __inline__ void ltt_dump_sys_call_table(void *call_data)

static __inline__ void ltt_dump_idt_table(void *call_data)

So you have to edit arch/sh/Kconfig to select HAVE_LTT_DUMP_TABLES.

Note that if you don't find an irq vector on sh, you can simply
implement an empty ltt_dump_idt_table function.



> Many thanks.
> Regards,
> Giuseppe
> PS: all the patches attached were built against my development tree.
> Indeed, it is quite aligned to the linux-2.6-lttng Git
> (2.6.30-lttng-0.151) so I guess these can be applied without
> too effort.
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> iEYEARECAAYFAkpxbqcACgkQ2Xo3j31MSSJSyQCdH1C1H52gTs5X95nwzBLryfvS
> y30An2Eeqf3u1AN+/oTogXPyyhjrbufv
> =0EZ/

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

More information about the lttng-dev mailing list