* [Bug translator/5019] New: histograms don't handle negative numbers properly
@ 2007-09-11 1:25 mmlnx at us dot ibm dot com
2007-09-11 18:34 ` [Bug translator/5019] " hunt at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: mmlnx at us dot ibm dot com @ 2007-09-11 1:25 UTC (permalink / raw)
To: systemtap
Both the hist_log and hist_linear extractors print bogus data when negative
numbers have been fed to an aggregation. Are histograms supposed to handle
negative numbers? BTW, the integer extractors work as expected.
Examples:
The following script:
global stat
probe begin {
stat <<< 1
stat <<< -20
stat <<< 300
stat <<< -5000
print(@hist_log(stat))
exit()
}
yields this output:
value |-------------------------------------------------- count
0 | 0
1 |@ 1
2 | 0
4 | 0
8 | 0
16 | 0
32 | 0
64 | 0
128 | 0
256 |@ 1
512 | 0
1024 | 0
2048 | 0
4096 | 0
8192 | 0
16384 | 0
32768 | 0
65536 | 0
131072 | 0
262144 | 0
524288 | 0
1048576 | 0
2097152 | 0
4194304 | 0
8388608 | 0
16777216 | 0
33554432 | 0
67108864 | 0
134217728 | 0
268435456 | 0
536870912 | 0
1073741824 | 0
2147483648 | 0
4294967296 | 0
8589934592 | 0
17179869184 | 0
34359738368 | 0
68719476736 | 0
137438953472 | 0
274877906944 | 0
549755813888 | 0
1099511627776 | 0
2199023255552 | 0
4398046511104 | 0
8796093022208 | 0
17592186044416 | 0
35184372088832 | 0
70368744177664 | 0
140737488355328 | 0
281474976710656 | 0
562949953421312 | 0
1125899906842624 | 0
2251799813685248 | 0
4503599627370496 | 0
9007199254740992 | 0
18014398509481984 | 0
36028797018963968 | 0
72057594037927936 | 0
144115188075855872 | 0
288230376151711744 | 0
576460752303423488 | 0
1152921504606846976 | 0
2305843009213693952 | 0
4611686018427387904 |@@ 2
And the following script with hist_linear():
global stat
probe begin {
stat <<< 1
stat <<< -20
stat <<< 300
stat <<< -5000
print(@hist_linear(stat, , 1024000000, 102400000))
exit()
}
yields this result:
value |-------------------------------------------------- count
0 |@@@@ 4
102400000 | 0
204800000 | 0
--
Summary: histograms don't handle negative numbers properly
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: mmlnx at us dot ibm dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5019
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug translator/5019] histograms don't handle negative numbers properly
2007-09-11 1:25 [Bug translator/5019] New: histograms don't handle negative numbers properly mmlnx at us dot ibm dot com
@ 2007-09-11 18:34 ` hunt at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: hunt at redhat dot com @ 2007-09-11 18:34 UTC (permalink / raw)
To: systemtap
------- Additional Comments From hunt at redhat dot com 2007-09-11 13:52 -------
I'll take a shot at this. At first glance there are multiple parser problems.
Not recognizing negative numbers and using istringstream to extract values from
a token without checking that the token is actually a valid number.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|systemtap at sources dot |hunt at redhat dot com
|redhat dot com |
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=5019
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-11 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-11 1:25 [Bug translator/5019] New: histograms don't handle negative numbers properly mmlnx at us dot ibm dot com
2007-09-11 18:34 ` [Bug translator/5019] " hunt 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).