[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070313131533.1ec468c3@lxorguk.ukuu.org.uk>
Date: Tue, 13 Mar 2007 13:15:33 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: "Michael K. Edwards" <medwards.linux@...il.com>
Cc: "Bodo Eggert" <7eggert@....de>,
"Eric Dumazet" <dada1@...mosbay.com>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: sys_write() racy for multi-threaded append?
> But on that note -- do you have any idea how one might get ltrace to
> work on a multi-threaded program, or how one might enhance it to
> instrument function calls from one shared library to another? Or
I don't know a vast amount about ARM ELF user space so no.
> better yet, can you advise me on how to induce gdbserver to stream
> traces of library/syscall entry/exits for all the threads in a
> process? And then how to cram it down into the kernel so I don't take
One way to do this is to use kprobes which will do exactly what you want
as it builds a kernel module. Doesn't currently run on ARM afaik.
> the hit for an MMU context switch every time I hit a syscall or
Not easily with gdbstubs as you've got to talk to something to decide how
to log the data and proceed. If you stick it kernel side its a lot of
ugly new code and easier to port kprobes over, if you do it remotely as
gdbstubs intends it adds latencies and screws all your timings.
gdbstubs is also not terribly SMP aware and for low level work its
sometimes easier to have on gdb per processor if you can get your brain
around it.
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists