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.
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