This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Array handling question
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Zoltan Kiss <zoltan dot kiss at linaro dot org>
- Cc: systemtap at sourceware dot org
- Date: Tue, 21 Jul 2015 10:24:47 -0400
- Subject: Re: Array handling question
- Authentication-results: sourceware.org; auth=none
- References: <55AD3A9F dot 4030703 at linaro dot org>
zoltan.kiss wrote:
> [...]
> global cnt = 0;
> [...]
> global runtimes;
> probe process(<procname>).function(<funcname>).return {
> [...]
> runtimes <<< runtime;
> if (cnt > 50000) {
> [...]
> delete runtimes;
> }
> cnt++;
> }
By the way, a more canonical way to count would be to drop the extra
"cnt" variable and use @count(runtimes) as the value to compare with 50000.
- FChE