This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Fix redundant implicit probe points in listing mode.
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: wenji dot huang at oracle dot com
- Cc: systemtap <systemtap at sourceware dot org>
- Date: Fri, 05 Sep 2008 09:27:32 -0400
- Subject: Re: [PATCH] Fix redundant implicit probe points in listing mode.
- References: <48C0EB0F.4060604@oracle.com>
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