From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25402 invoked by alias); 10 Sep 2007 21:15:21 -0000 Received: (qmail 25310 invoked by uid 48); 10 Sep 2007 21:15:10 -0000 Date: Tue, 11 Sep 2007 01:25:00 -0000 From: "mmlnx at us dot ibm dot com" To: systemtap@sources.redhat.com Message-ID: <20070910211510.5019.mmlnx@us.ibm.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug translator/5019] New: histograms don't handle negative numbers properly X-Bugzilla-Reason: AssignedTo Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00559.txt.bz2 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.