[PATCH] Fix redundant implicit probe points in listing mode.
Frank Ch. Eigler
fche@redhat.com
Fri Sep 5 13:29:00 GMT 2008
Wenji Huang <wenji.huang@oracle.com> writes:
> There are redundant probe points those will be outputted in listing
> mode. Such as:
> [wjhuang@systemtap]$ stap -l signal.d*
> signal.do_action
> begin(-1)
> end idx0:long
Right.
> @@ -1148,6 +1148,8 @@ semantic_pass_symbols (systemtap_session& s)
> void add_global_var_display (systemtap_session& s)
> {
> varuse_collecting_visitor vut;
> +
> + if (s.listing_mode) return;
That's not too bad, though perhaps a session flag for
global_var_display per se could be used instead. (It'd default to
"on"; not have any command line option to disable it directly yet; but
"-l"/'-L" would clear it.)
> @@ -173,7 +173,8 @@ printscript(systemtap_session& s, ostream& o)
> second->locations[0]->print(tmps); // XXX: [0] is less
> arbitrary here, but still ...
> }
> string pp = tmps.str();
> -
> + if (!pp.compare("begin(-1)")) continue;
> +
This one can't go in. Instead, the tapset that includes that
begin(-1) probe could be changed to do the initialization in a
function (with a private initted-already? flag) rather than the begin
probe. Future listings based on PR 3498 should make that workaround
unnecessary.
- FChE
More information about the Systemtap
mailing list