This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Array handling question
- From: Zoltan Kiss <zoltan dot kiss at linaro dot org>
- To: "Frank Ch. Eigler" <fche at redhat dot com>, Josh Stone <jistone at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Fri, 31 Jul 2015 12:44:54 +0100
- Subject: Re: Array handling question
- Authentication-results: sourceware.org; auth=none
- References: <55AD3A9F dot 4030703 at linaro dot org> <y0msi8hk2q8 dot fsf at fche dot csb>
Many thanks guys, I was able to sort it out!
Though I'm not on the list, but Google pointed me in the end to Josh's
reply in the archives :)
Yes, I've mixed up stats with arrays in my mind, that was the root of
the problems.
Regards,
Zoltan
On 21/07/15 15:24, Frank Ch. Eigler wrote:
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