Bug 5686

Summary: automagic printing of global arrays
Product: systemtap Reporter: Frank Ch. Eigler <fche>
Component: translatorAssignee: Stan Cox <scox>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Frank Ch. Eigler 2008-01-28 20:31:25 UTC
It would be a convenient effort-saving device to have the translator
synthesize simple foreach/print loops for arrays that are "forgotten":
only written to.  Then a single-liner script could be used for simple
reports:

probe timer.profile { hotfuncs[execname(), probefunc()] <<< 1 }

In the same vein, we could have the translator automatically declare
arrays like hotfuncs as global (with a warning).
Comment 1 Frank Ch. Eigler 2008-08-05 20:30:03 UTC
The automagic declaration of arrays as global could be done
unconditionally, maybe not even bothering with a warning.

Their automatic printing could be conditional on a command
line flag.  Maybe default-yes -- but would first need to
analyze existing systemtap scripts to see whether this would
kick in unexpectedly.

Globals defined by tapsets should probably not get this
treatment.
Comment 2 Stan Cox 2008-09-02 16:17:51 UTC
Display written but unread global statistics.
Automatically print written but unread globals