From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 9 Nov 2009 22:26:05 -0500 To: 9fans@9fans.net Message-ID: In-Reply-To: <<9ab217670911091908u25e0a23bk838bd67c460492ac@mail.gmail.com>> References: <<9ab217670911091908u25e0a23bk838bd67c460492ac@mail.gmail.com>> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] dtrace for plan 9 Topicbox-Message-UUID: 9869d5cc-ead5-11e9-9d60-3106f5b1d025 > DTrace by itself is pretty lame. It needs providers to be interesting. > By itself, it's a very limited interpreter that supports BEGIN and > END, and a couple other tiny things (ERROR, maybe?). Devtrace would be > analogous to the syscall provider for DTrace, from my understanding. i may be misunderstanding you, but devtrace can trace any call site or return in the kernel. not just system calls. and not just entire functions; one could enable tracing on just one return, for example. you just give it a range of addresses and it loops through finding the magic left by the linker. enabling a trace atomicly modifies each site to turn on tracing. > I'd estimate a finished version to be about the size of > the Plan 9 kernel. minooka; wc -l /sys/src/9/*/*trace*.[chs] /sys/src/libc/386/trace.s 118 /sys/src/9/pc/archtrace.c 18 /sys/src/9/pc/archtrace.h 578 /sys/src/9/port/devtrace.c 33 /sys/src/libc/386/trace.s 747 total this stuff's ready to take off. (har har har.) - erik