Replies: 5 comments 5 replies
-
|
Beta Was this translation helpful? Give feedback.
-
If I understand the question, then I think I don't quite understand the issue you see. Some background.
The branch expression (if known) is used to decide who matches who.
For the first case, it assumes that the order of In the second case: it assumes that the related conditional is the same if the number of branch records and their branch expressions are the same. Unfortunately: it isn't hard to see that there isn't sufficient information in the output data for You mentioned that you are using windows - but you didn't mention your toolchain and toolchain version, or what the source of your input Without seeing your actual data (or a representative small testcase), I am not sure what to suggest. Henry |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for this detail answer and so quick reply!!! This is very useful to me to understand how lcov works now.
I‘m using Intel compiler (which is derived from llvm/clang), and the coverage data format is
Suppose we are comparing BRDAs in line 7 of example code:
Windows:
Merged order linux info, then windows info: (lcov -a linux.info -a windows.info -o merged.info)
Merged order windows info, then linux info: (lcov -a windows.info -a linux.info -o merged.info)
The example code is very simple, but suppose we have complex conditions in real project which the branch in line:7 are multiple conditions and some of them are not covered (neither some platform-specific template instantiations nor code logic depends on different platforms). Then, we plan to write more test cases to improve coverage. But when we run test cases to generate new coverage data, how can we know which branch coverage got improvement? |
Beta Was this translation helpful? Give feedback.
-
The first integer after "BRDA:" is the source line number. Your compiler/toolchain is broken and is generating bogus branch information. You should try to upgrade to a newer version - and see if that addresses the issue. |
Beta Was this translation helpful? Give feedback.
-
Your first block (numbrerd The block ID is not meaningful - except block IDs on a particular line are unique. Rather than hacking up data manually and trying to illustrate some point, it is far better - and far easier for both of us - to instead show a complete example (with source code and makefiles). Then we know that we are both looking at valid, tool-generated data, and that we are both seeing the same issues. |
Beta Was this translation helpful? Give feedback.
-
I have two tracefile, one contains data collected on Linux, another contains data collected on Windows. After I used
-a
option to merge them into one overall tracefile, I found some BRDA's second number changed:BRDA:7,0,2,0
changed toBRDA:7,1,2,0
if the Linux tracefile is behind Windows tracefile with-a
option, vice versa.Beta Was this translation helpful? Give feedback.
All reactions