From: Kris Van Hees <kris.van.hees@oracle.com>
To: Eugene Loh <eugene.loh@oracle.com>
Cc: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: Re: [DTrace-devel] [PATCH 1/2] examples: update the comments in script fcalls.d
Date: Fri, 15 Aug 2025 11:56:18 -0400 [thread overview]
Message-ID: <aJ9Yonv8Km/Js/Kh@oracle.com> (raw)
In-Reply-To: <f7f3d5d9-4400-3544-858a-d7440ba79afd@oracle.com>
Comment below...
On Thu, Aug 14, 2025 at 06:24:56PM -0400, Eugene Loh via DTrace-devel wrote:
> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
>
> On 8/14/25 18:22, eugene.loh@oracle.com wrote:
> > From: Ruud van der Pas <ruud.vanderpas@oracle.com>
> >
> > dtrace/ChangeLog
> > 2025-08-14 Ruud van der Pas <ruud.vanderpas@oracle.com>
> >
> > * examples/fcalls.d: Modified several comments.
> >
> > Signed-off-by: Ruud van der Pas <ruud.vanderpas@oracle.com>
> > ---
> > examples/fcalls.d | 14 +++++++++-----
> > 1 file changed, 9 insertions(+), 5 deletions(-)
> >
> > diff --git a/examples/fcalls.d b/examples/fcalls.d
> > index 9e42f0041..c332dce40 100755
> > --- a/examples/fcalls.d
> > +++ b/examples/fcalls.d
> > @@ -8,7 +8,7 @@
> > * sudo ./fcalls.d -c "<name-of-application> [app options]"
> > *
> > * DESCRIPTION
> > - * This program lists the functions executed by the target
> > + * This script lists the functions executed by the target
> > * application. In addition to this, the number of calls to
> > * each function is printed. This information is given on a
> > * per-thread basis, as well as aggregated over all threads.
> > @@ -19,12 +19,14 @@
> > * duplicate the probe definitions and in the copied lines
> > * replace a.out by libc.so.
> > * For example:
> > - * pid$target:a.out::entry,pid$target:libc.so::entry
> > - * { ... }
> > + * pid$target:a.out::entry,
> > + * pid$target:libc.so::entry
> > + * { <clauses> }
This is a strange comment... A clause in D is understood to be a { ... }
code block that is associated with one or more probe specifications. So,
{ <clauses> } is not really conveying a correct syntax/terminology mix.
I think that the original { ... } was actually more clear.
> > + *
> > * - It is assumed that a function called main is executed.
> > * If this is not the case, this is not a critical error.
> > * The first probe is used to capture the name of the executable,
> > - * but this is not critical. The probe and printf statement
> > + * but this is not essential. The probe and printf statement
> > * can safely be removed, or replaced by a suitable alternative.
> > */
> > @@ -45,9 +47,10 @@ pid$target:a.out:main:entry
> > {
> > executable_name = execname;
> > }
> > +
> > /*
> > * Use 4 aggregations to store the total number of function
> > - * calls, the counts per function and per thread, both
> > + * calls, the counts per function and per thread, both
> > * seperately and differentiated by thread and function.
> > */
> > pid$target:a.out::entry
> > @@ -57,6 +60,7 @@ pid$target:a.out::entry
> > @call_counts_per_thr[tid] = count();
> > @counts_per_thr_and_function[tid,probefunc] = count();
> > }
> > +
> > /*
> > * Print the results. Use format strings to create a
> > * table lay-out.
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
prev parent reply other threads:[~2025-08-15 15:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 22:22 [PATCH 1/2] examples: update the comments in script fcalls.d eugene.loh
2025-08-14 22:22 ` [PATCH 2/2] examples: add more scripts, and a README file eugene.loh
2025-08-19 21:58 ` Eugene Loh
2025-08-14 22:24 ` [PATCH 1/2] examples: update the comments in script fcalls.d Eugene Loh
2025-08-15 15:56 ` Kris Van Hees [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aJ9Yonv8Km/Js/Kh@oracle.com \
--to=kris.van.hees@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
--cc=eugene.loh@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox