This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/20599] New: collected bit shift & variance rewritten by new histogram during elaboration
- From: "mcermak at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 12 Sep 2016 12:25:23 +0000
- Subject: [Bug translator/20599] New: collected bit shift & variance rewritten by new histogram during elaboration
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20599
Bug ID: 20599
Summary: collected bit shift & variance rewritten by new
histogram during elaboration
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: mcermak at redhat dot com
Target Milestone: ---
Created attachment 9508
--> https://sourceware.org/bugzilla/attachment.cgi?id=9508&action=edit
proposed patch
Following script fails to compute variance correctly:
=======
$ stap --poison-cache -e 'global x probe oneshot { x<<<1 x<<<10 x<<<100
println("v: ", @variance(x, 3)) print(@hist_linear(x, 0, 100, 1)) }'
v: 1944
value |-------------------------------------------------- count
0 | 0
1 |@ 1
2 | 0
3 | 0
~
8 | 0
9 | 0
10 |@ 1
11 | 0
12 | 0
~
98 | 0
99 | 0
100 |@ 1
$
=======
In the above example, variance should have been 2997, not 1944:
=======
$ stap --poison-cache -e 'global x probe oneshot { x<<<1 x<<<10 x<<<100
println("v: ", @variance(x, 3)) }'
v: 2997
$
=======
One can check the `... -p3 | grep _stp_stat_init` output to see that in the
first case, new histogram rewrites collected stat_ops and bit_shift for given
global. This problem comes from the elaboration phase. Attached patch fixes
it.
--
You are receiving this mail because:
You are the assignee for the bug.