]> sourceware.org Git - systemtap.git/commitdiff
Fix PR20599 by only updating needed members of statistic_decl.
authorMartin Cermak <mcermak@redhat.com>
Tue, 13 Sep 2016 08:56:14 +0000 (10:56 +0200)
committerMartin Cermak <mcermak@redhat.com>
Tue, 13 Sep 2016 09:06:47 +0000 (11:06 +0200)
After introducing @variance in commit 63ead7fa, stat_ops and
bit_shift need to be tracked within the statistic_decl.  Before
this update, new histogram always rewrote these new members,
which was causing the problem described in PR20599.

elaborate.cxx: Only rewrite type, linear_low, linear_high, and
         linear_step, when binding new histogram with a global.

elaborate.cxx

index 010fda038d82eadc785cf8448f041ed89d89244a..bd26d1541e22f18d4a4ad0e02da3248014cd9bd4 100644 (file)
@@ -1382,7 +1382,12 @@ struct stat_decl_collector
        if (!(old_stat == new_stat))
          {
            if (old_stat.type == statistic_decl::none)
-             i->second = new_stat;
+             {
+               i->second.type = new_stat.type;
+               i->second.linear_low = new_stat.linear_low;
+               i->second.linear_high = new_stat.linear_high;
+               i->second.linear_step = new_stat.linear_step;
+             }
            else
              {
                // FIXME: Support multiple co-declared histogram types
This page took 0.035601 seconds and 5 git commands to generate.