diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-27 16:03:08 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-27 16:03:08 +0000 |
commit | 77a5e1970ee1be164e4212fccd784c525c15f9c1 (patch) | |
tree | 7ab29dd959f70e85e71482ef0788c9d2f18c1ce0 /contrib | |
parent | 532c3782b48dbc9717dfddb38ae24a174f433368 (diff) | |
download | gcc-77a5e1970ee1be164e4212fccd784c525c15f9c1.tar.gz |
* analyze_brprob: Avoid overflows.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44430 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rwxr-xr-x | contrib/analyze_brprob | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index f9d48b116ec..4284410b0c7 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +Fri Jul 27 18:01:21 CEST 2001 Jan Hubicka <jh@suse.cz> + + * analyze_brprob: Avoid overflows. + 2001-07-27 Richard Henderson <rth@redhat.com> * gcc_update: Dump timestamp in LAST_UPDATED. diff --git a/contrib/analyze_brprob b/contrib/analyze_brprob index c385d847b56..3c7e8e5712d 100755 --- a/contrib/analyze_brprob +++ b/contrib/analyze_brprob @@ -116,17 +116,17 @@ BEGIN {nnames = 0} } counts[name]=counts[name] "+" count hits[name]=hits[name] "+" hit - if (int (hit) < (int (count) / 2)) - hit = count - hit; + if (float (hit) < (float (count) / 2)) + hit = "("count" - "hit")"; phits[name]=phits[name] "+" hit #BC crashes on long strings. Irritating. - if (length(counts[name]) > 4000) - { - counts[name] = longeval(counts[name]) - hits[name] = longeval(hits[name]) - phits[name] = longeval(phits[name]) - } + if (length(counts[name]) > 2000) + counts[name] = longeval(counts[name]) + if (length(hits[name]) > 2000) + hits[name] = longeval(hits[name]) + if (length(phits[name]) > 2000) + phits[name] = longeval(phits[name]) } END { # Heuristics called combined predicts just everything. |