This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: rethinking syscall tapset
- From: "Daniel P. Berrange" <berrange at redhat dot com>
- To: Martin Hunt <hunt at redhat dot com>
- Cc: Hien Nguyen <hien at us dot ibm dot com>, "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Tue, 31 Jan 2006 18:50:55 +0000
- Subject: Re: rethinking syscall tapset
- References: <1138689272.3948.17.camel@monkey2> <43DF98AC.7070506@us.ibm.com> <1138732810.3935.24.camel@monkey2>
- Reply-to: "Daniel P. Berrange" <berrange at redhat dot com>
On Tue, Jan 31, 2006 at 10:40:10AM -0800, Martin Hunt wrote:
> On Tue, 2006-01-31 at 09:04 -0800, Hien Nguyen wrote:
> > Hi Martin,
> >
> > Looking good. I like the tracestr and returnp idea. The tracestr , we
> > could build a string similar to strace if want too.
>
> That's the idea. I now think it would be best to leave the function
> name off and call it "argstr". So to do strace,
> printf("%s(%s) = ", name, argstr)
> then on the return, do
> printf("%d\n", returnval())
You need to maintain state between the call & return, only printing
the complete string in the return, if you want to trace > 1 process
or thread at once, otherwise the first & second calls to printf()
can get all jumbled up.
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, London. +44 7977 267 243 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|