diff options
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index e4251f2a..7cbac31f 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1147,7 +1147,9 @@ semantic_pass_symbols (systemtap_session& s) // Keep unread global variables for probe end value display. void add_global_var_display (systemtap_session& s) { - if (s.listing_mode) return; // avoid end probe in listings_mode + // Don't generate synthetic end probes when in listings mode; + // it would clutter up the list of probe points with "end ...". + if (s.listing_mode) return; varuse_collecting_visitor vut; for (unsigned i=0; i<s.probes.size(); i++) @@ -1165,6 +1167,22 @@ void add_global_var_display (systemtap_session& s) || vut.written.find (l) == vut.written.end()) continue; + // Don't generate synthetic end probes for unread globals + // declared only within tapsets. (RHBZ 468139), but rather + // only within the end-user script. + + bool tapset_global = false; + for (size_t m=0; m < s.library_files.size(); m++) + { + for (size_t n=0; n < s.library_files[m]->globals.size(); n++) + { + if (l->name == s.library_files[m]->globals[n]->name) + {tapset_global = true; break;} + } + } + if (tapset_global) + continue; + print_format* pf = new print_format; probe* p = new probe; probe_point* pl = new probe_point; |