linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* advanced tracing API
@ 2002-08-28 15:01 David Howells
  0 siblings, 0 replies; only message in thread
From: David Howells @ 2002-08-28 15:01 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel


I've written an advanced tracing API as a potential replacement for ptrace. It
isn't quite complete yet, but sufficient functionality should exist to
implement strace.

It works by adding a new system call that deals with file descriptors with
"special" files attached (much as sysvipc shm does). The fds are, however,
exposed and can be polled. Each fd manages a thread group.

It has full support for threads created with CLONE_THREAD.

Documentation is included in the trace-2532 patch.

Comments would be appreciated.

It is available as a pair of patches to 2.5.32 plus a test/demo program:

	ftp://infradead.org/pub/people/dwh/orn-2532.diff.bz2
	ftp://infradead.org/pub/people/dwh/trace-2532.diff.bz2
	ftp://infradead.org/pub/people/dwh/trctl2.c

Apply the orn-2532 and then the trace-2532 patches to a 2.5.32 kernel, build
and install. The trctl2 program needs access to the header files from the
patched kernel at the moment.

Run trctl2 under the patched kernel. It will fork off an "inferior" process
and begin trapping and displaying certain events from it. The inferior process
will then create a set of threads which will then also be managed by the
"debugger". These threads can be hit with signals to make events happen.

David

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-28 14:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-28 15:01 advanced tracing API David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).