Re: [PATCH 0/2 v2] Syscalls tracing

From: Frederic Weisbecker
Date: Sun Mar 15 2009 - 11:25:49 EST


On Fri, Mar 13, 2009 at 05:17:49PM +0100, Ingo Molnar wrote:
>
> * Ingo Molnar <mingo@xxxxxxx> wrote:
>
> >
> > * Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
> >
> > > On Fri, Mar 13, 2009 at 03:42:10PM +0100, Frederic Weisbecker wrote:
> > > > tracing/syscalls: core infrastructure to trace syscalls
> > > >
> > > > This new iteration addresses a good part of the previous reviews.
> > >
> > >
> > > Ah I just discovered that you applied the previous version
> > > today. But the v2 is not a delta :-s
> > >
> > > I can rebase them but not until Sunday.
> >
> > No problem, i'll deltify them and will have a look.
>
> Ok, i did the deltas, tidied them up and put them into
> tip:tracing/syscalls.
>
> Nice stuff! Here's some sample output:
>
> aldebaran:/debug/tracing> head trace
> # tracer: syscall
> #
> # TASK-PID CPU# TIMESTAMP FUNCTION
> # | | | | |
> <...>-4405 [003] 188.452934: sys_dup2(oldfd: a, newfd: 1)
> <...>-4405 [003] 188.452939: sys_dup2 -> 0x1
> <...>-4405 [003] 188.452940: sys_fcntl(fd: a, cmd: 1, arg: 0)
> <...>-4405 [003] 188.452941: sys_fcntl -> 0x1
> <...>-4405 [003] 188.452942: sys_close(fd: a)
> <...>-4405 [003] 188.452943: sys_close -> 0x0
>
> A suggestion:
>
> - Would be nice for all the registered syscalls to show up
> under /debug/events/syscalls/, one directory per syscall,
> with an 'enable' and a 'format' file as well.


Nice idea.
It is somehow planned since I want to let the user export the traces
through their binary values (so they will need the format).


> And a bugreport:
>
> - when using function_graph (after having used the syscall
> tracer) i dont see graph traces anymore - only the syscall
> trace entries:


Ah exact, it seems I forgot to reset the buffer while switching the tracer.


> # tracer: function_graph
> #
> # CPU DURATION FUNCTION CALLS
> # | | | | | | |
> ##### CPU 9 buffer started ####
> at-spi-registry-3063 [009] 322.915058: sys_read -> 0x5a8
> at-spi-registry-3063 [009] 322.915059: sys_write(fd: 6, buf: 632840, count: 5a8)
> at-spi-registry-3063 [009] 322.915062: sys_write -> 0x5a8
> at-spi-registry-3063 [009] 322.915062: sys_read(fd: 4, buf: 632840, count: 40000)
>
> That's not intended, right?


Indeed it's not. I'm cooking the fix.

Thanks.


> Ingo

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/