This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Add A Sample To Exapmle
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Bingwu Yang <detailyang at gmail dot com>
- Cc: systemtap at sourceware dot org
- Date: Mon, 07 Nov 2016 08:46:34 -0500
- Subject: Re: Add A Sample To Exapmle
- Authentication-results: sourceware.org; auth=none
- References: <CAHhYu0j-myL9OBMjTQLkVehR5Jei=tdXicKfrHz2FA1Lxtv=AA@mail.gmail.com>
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