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).
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.
Display written but unread global statistics. Automatically print written but unread globals