Bug 5686 - automagic printing of global arrays
Summary: automagic printing of global arrays
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Stan Cox
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-28 20:31 UTC by Frank Ch. Eigler
Modified: 2008-09-02 16:17 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 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