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: Add A Sample To Exapmle


Hi -

> I add a sample systemtap script to source tree. Wish it can be useful:)
> Can anybody help me to review this patch?
> [...]


> diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
> index d9a7d47..5952356 100644
> --- a/testsuite/systemtap.examples/index.html
> +++ b/testsuite/systemtap.examples/index.html
> [...]

(This is OK, but you don't have to include diffs of machine-generated
files for review.)


> [...]
> +global record

This is fine, except that there is no limit in your script as to how
many records may be kept alive.  This record array will grow and grow
and eventually overflow with a MAXMAPENTRIES-related error.  Consider

global record%

to activate wrapping (LRU) mode, so that older entries will be 
reused when the array fills up.


> +probe begin {
> +    warn("Printing tcp retransmission")
> +}

Please consider log() or such instead of warn().

Otherwise looks good.  What do you think about the suggestions?

- FChE


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