Bug 6746 - support aggregates as function args
Summary: support aggregates as function args
Status: NEW
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P3 enhancement
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-14 23:50 UTC by Jim Keniston
Modified: 2008-07-14 23:50 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Keniston 2008-07-14 23:50:02 UTC
It would be handy if an aggregate (statistics) could be passed as a function
argument.

$ cat agerr.stp
global a
function printag(ag) {
	if (@count(ag) > 0)
		printf("%d\n", @sum(ag))
}
probe begin {
	a <<< 13
	a <<< 42
	printag(a)
	exit()
}
$ stap agerr.stp
semantic error: probe_1712 with invalid type stats: identifier 'printag' at
agerr.stp:9:2
semantic error: probe_1712 with invalid type stats: identifier 'ag' at :2:18
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.
$