This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Array handling question


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]