This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rethinking syscall tapset


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  -=| 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]