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


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]