[llvm-bugs] [Bug 28990] New: Incorrect sample profile when braces omitted
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 15 15:13:29 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28990
Bug ID: 28990
Summary: Incorrect sample profile when braces omitted
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dcallahan at fb.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16959
--> https://llvm.org/bugs/attachment.cgi?id=16959&action=edit
script to demonstrate
Attached are two source variables, bug1.cc and bug2.cc which differ only in the
placement of braces around a then-statement. When these braces are omitted, a
profile-based sample is incorrect while it is correct when they are present.
Reproduction steps are in bug1.sh
create_llvm_prof is available at https://github.com/google/autofdo
The incorrect sample derived from bug1.cc (from llvm-profdata show) is:
Function: _Z8clampSumPdidd: 100803968, 0, 13 sampled lines
Samples collected in the function's body {
0: 0
1: 0
2.1: 908152
2.2: 908138
3: 908139
4: 0
5: 908146
6: 908142
7: 908150
9: 908149
10: 908146
11: 908138
13: 4
}
while the correct sample derived from bug2.cc is
Function: _Z8clampSumPdidd: 101434538, 1, 14 sampled lines
Samples collected in the function's body {
0: 1
1: 1
2.1: 913831
2.2: 913817
3: 913818
4: 0
5: 913830
6: 913826
7: 0
8: 913834
9: 913831
10: 913827
11: 913821
13: 1
}
where the key differences is the value for relative line 7, it should be 0.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160815/eebf11d7/attachment.html>
More information about the llvm-bugs
mailing list