On Fri, Dec 17, 2010 at 03:44:00PM -0500, Brian Utterback wrote: > I am aggregating using the stack function as the index: > > @s[stack()] = count(); > > This works great. However, I found that in addition to how many times > each stack appears, it would also be useful to know which stacks were > called shortly before the script exited. So I thought to make an > associative array with the same indexes, and store the timestamp the > last time they were set: > > ts[stack()] = timestamp; > > This gives me an error: > tracing function stack( ) may not be called from a D expression (D > program context required) > > Why can't I use stack as the index to an associative array when I can > use it as the index to an aggregation? Am I doing something wrong? And > if I can't use it, does anyone have a suggestion how to store the time > of the last call of each stack?
While I don't know the answer to your question, a workaround would be to use max() as the aggregation function... Nico -- _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org