People seem to find useful the basic "perf -e EVENT -e EVENT2 CMD" type of invocation, where the tool reports overall event counts. We could support such a shortcut too, for example: stap -E perf.sw_clock -E 'syscall.*' -c CMD to be rewritten into something close to stap -e 'global c; probe perf.sw_clock,syscall.* { c[pn()]<<<1 }' -c CMD except perhaps the automatic global-c printing loop could restrict itself to @count() only.
Note that this may be achievable with no translator code changes, but rather just a systemtap script that's parametrized with the probe points, ie. % stap eventcount.stp perf.sw_clock 'syscall.*'
commit: eb521ae66706271bd0687db92fcb346cff3fee90 An eventcount.stp script has now been added which allows for event counting in the format of 'stap eventcount.stp syscall.* process.end ...' with a printout of tid's event and count. NEWS - news blurb testsuite/systemtap.examples/general/eventcount.meta - meta file testsuite/systemtap.examples/general/eventcount.stp - script itself