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] | |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "FCHE" == Frank Ch Eigler <fche@redhat.com> writes:
Hi Frank, thanks for the reply.
MM> Section 3.6 Mention use of the deref() macro in embedded C for
MM> safety. Give an example.
>> I could use a little help with this. Would anyone be able to
>> provide a good working example?
FCHE> There are examples in the tapset.
Sorry, do you mean there are specific examples of how to use the deref
macro? I didn't find any.
FCHE> Josh switched us over to the "kread" function:
FCHE> function _struct_timeval:string(addr:long) %{ /* pure */
FCHE> struct timeval *tv = (struct timeval *)(unsigned
FCHE> long)THIS->addr;
FCHE> if (tv == NULL) strlcpy (THIS->__retvalue, "NULL",
FCHE> MAXSTRINGLEN); else snprintf(THIS->__retvalue, MAXSTRINGLEN,
FCHE> "[%ld.%06ld]", kread(&(tv->tv_sec)), kread(&(tv->tv_usec)));
FCHE> %}
OK, kread replaces deref? I can certainly insert this example, but I
really don't know how to document it in the Guide.
FCHE> (However, it is not clear that the NULL-handling case is
FCHE> relevant or appropriate. If the timeval* coming in from the
FCHE> application is permitted to be NULL, fine, but if it's meant
FCHE> as a crash-prevention mechanism in this embedded-C routine,
FCHE> then it's not right.)
If you don't know, then I certainly don't either :)
>> [...]
MM> Sections 8.4.1 - 8.4.3 Show examples of the output that results
MM> from using these functions.
>> I'd like to be provided with self-contained examples that I can
>> document, run and capture the output.
FCHE> If you have a working systemtap build, it should not be hard
FCHE> to make such examples yourself. Its ease-of-use is the stuff
FCHE> of legend ... or in any case well tested by newbie users.
Right, but several runs have resulted in hard lockups of my poor
workstation and I got tired of that very fast. You will see that I have
provided output in a few more of the examples in the Guide. I get your
point, but illustrative examples provided by experts in SystemTap in the
remaining areas would be helpful, IMHO.
MM> Section 9.2.21 Explain what is meant by the "target process."
>> Does this mean the PID of the program being probed?
FCHE> Sort of - see the "-c PROGRAM" and "-x PID" stap options. The
FCHE> man page for "-c" should be clarified to point out that the
FCHE> target() stapfuncs.5 function is set analogously to the -x
FCHE> case.
Please check the Guide and see if what I included is sufficient.
Here's the latest version.
Attachment:
SystemTap-Language-Ref-20070222.tex.gz
Description: SystemTap-Language-Ref-20070222.tex.gz
Attachment:
SystemTap-Language-Ref-20070222.ps.gz
Description: SystemTap-Language-Ref-20070222.ps.gz
Regards, Robb - -- Robb Romans (512) 838-0419 Linux Commando T/L 678-0419 robb@linux.vnet.ibm.com ARS NA5TT .-- - ..-. ..--.. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> iD8DBQFF3gQjZyOifwSFgjQRAqlxAKC4kiD6vsHFeA0pR6fGtgR75PspIQCfdGSr iniW2b5Ic1nEWm5mGvFUn0c= =g2d3 -----END PGP SIGNATURE-----
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |