[DTrace-devel] [PATCH 1/2] examples: update the comments in script fcalls.d

Eugene Loh eugene.loh at oracle.com
Thu Aug 14 22:24:56 UTC 2025


Reviewed-by: Eugene Loh <eugene.loh at oracle.com>

On 8/14/25 18:22, eugene.loh at oracle.com wrote:
> From: Ruud van der Pas <ruud.vanderpas at oracle.com>
>
> dtrace/ChangeLog
> 2025-08-14  Ruud van der Pas  <ruud.vanderpas at oracle.com>
>
> 	* examples/fcalls.d: Modified several comments.
>
> Signed-off-by: Ruud van der Pas <ruud.vanderpas at 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> }
> + *
>    *    - 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.



More information about the DTrace-devel mailing list