summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata
diff options
context:
space:
mode:
authorNathan Slingerland <slingn@gmail.com>2015-12-02 18:19:24 +0000
committerNathan Slingerland <slingn@gmail.com>2015-12-02 18:19:24 +0000
commitaa5702d92b75427d9900703c0b4226f9bb24d1d4 (patch)
tree1ed72cfb44966d882db475e8e51fb83d94cb253d /llvm/test/tools/llvm-profdata
parentf520eff7827912ab1f9aa2dd08fcd2b0bfa4f945 (diff)
downloadbcm5719-llvm-aa5702d92b75427d9900703c0b4226f9bb24d1d4.tar.gz
bcm5719-llvm-aa5702d92b75427d9900703c0b4226f9bb24d1d4.zip
[llvm-profdata] Change instr prof counter overflow to saturate rather than discard
Summary: This changes overflow handling during instrumentation profile merge. Rathar than throwing away records that would result in counter overflow, merged counts are instead clamped to the maximum representable value. A warning about counter overflow is still surfaced to the user as before. Reviewers: dnovillo, davidxl, silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14893 llvm-svn: 254525
Diffstat (limited to 'llvm/test/tools/llvm-profdata')
-rw-r--r--llvm/test/tools/llvm-profdata/overflow.proftext16
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-profdata/overflow.proftext b/llvm/test/tools/llvm-profdata/overflow.proftext
index cbf3bf16182..b8401ffd84d 100644
--- a/llvm/test/tools/llvm-profdata/overflow.proftext
+++ b/llvm/test/tools/llvm-profdata/overflow.proftext
@@ -1,12 +1,20 @@
-# RUN: llvm-profdata merge %s -o %t.out 2>&1 | FileCheck %s
-# CHECK: overflow.proftext: overflow: Counter overflow
+# RUN: llvm-profdata merge %s -o %t.out 2>&1 | FileCheck %s --check-prefix=MERGE
+# RUN: llvm-profdata show %t.out | FileCheck %s --check-prefix=SHOW
+# MERGE: overflow.proftext: overflow: Counter overflow
+# SHOW: Total functions: 1
+# SHOW: Maximum function count: 18446744073709551615
+# SHOW: Maximum internal block count: 18446744073709551615
overflow
1
-1
+3
+18446744073709551615
9223372036854775808
+18446744073709551615
overflow
1
-1
+3
+9223372036854775808
9223372036854775808
+0
OpenPOWER on IntegriCloud