public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/17246] New: Elide write-only tapset globals
@ 2014-08-08 21:27 jistone at redhat dot com
  0 siblings, 0 replies; only message in thread
From: jistone at redhat dot com @ 2014-08-08 21:27 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=17246

            Bug ID: 17246
           Summary: Elide write-only tapset globals
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: jistone at redhat dot com

Following on PR17242, it would be nice if we could elide tapset globals which
are initialized, but never actually used.  Write-only user globals are chosen
for automatic probe end display in add_global_var_display(), but tapset globals
should ideally be fine to remove.

However, there's this caution in dead_assignment_remover::visit_assignment():

  // NB: Not so fast!  The left side could be an array whose
  // index expressions may have side-effects.  This would be
  // OK if we could replace the array assignment with a
  // statement-expression containing all the index expressions
  // and the rvalue... but we can't.
  // Another possibility is that we have an unread global variable
  // which are kept for probe end value display.

So it refuses to remove assignments to any global variables at all.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-08 21:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08 21:27 [Bug translator/17246] New: Elide write-only tapset globals jistone at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).