forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sancov] introducing symbolized coverage files (.symcov)
Summary: Answering any meaningful questions about .sancov files requires accessing symbol information from the corresponding binary. This change introduces a separate intermediate data structure and format: symbolized coverage. It contains all symbol information that is required to answer common queries: - merging - coverd/uncovered files and functions - line status. Also removing the html report functionality from sancov: generated HTML files are too huge, and a different approach is required. Maintaining this half-working approach in the C++ is painful. Differential Revision: https://reviews.llvm.org/D24947 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282639 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
07aadc2
commit dc72d13
Showing
7 changed files
with
773 additions
and
746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"covered-points" : ["4e132b", "4e1472", "4e1520", "4e1553", "4e1586"], | ||
"binary-hash" : "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5", | ||
"point-symbol-info" : { | ||
"test/tools/sancov/Inputs/foo.cpp" : { | ||
"foo()" : { | ||
"4e178c" : "5:0" | ||
} | ||
}, | ||
"test/tools/sancov/Inputs/test.cpp" : { | ||
"bar(std::string)" : { | ||
"4e132b" : "12:0" | ||
}, | ||
"main" : { | ||
"4e1472" : "14:0", | ||
"4e14c2" : "16:9", | ||
"4e1520" : "17:5", | ||
"4e1553" : "17:5", | ||
"4e1586" : "17:5", | ||
"4e1635" : "19:1", | ||
"4e1690" : "17:5" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"covered-points" : ["4e132b", "4e1472", "4e14c2", "4e1520", "4e1553", "4e1586", "4e178c"], | ||
"binary-hash" : "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5", | ||
"point-symbol-info" : { | ||
"test/tools/sancov/Inputs/foo.cpp" : { | ||
"foo()" : { | ||
"4e178c" : "5:0" | ||
} | ||
}, | ||
"test/tools/sancov/Inputs/test.cpp" : { | ||
"bar(std::string)" : { | ||
"4e132b" : "12:0" | ||
}, | ||
"main" : { | ||
"4e1472" : "14:0", | ||
"4e14c2" : "16:9", | ||
"4e1520" : "17:5", | ||
"4e1553" : "17:5", | ||
"4e1586" : "17:5", | ||
"4e1635" : "19:1", | ||
"4e1690" : "17:5" | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
REQUIRES: x86_64-linux | ||
RUN: sancov -merge %p/Inputs/test-linux_x86_64.0.symcov| FileCheck --check-prefix=MERGE1 %s | ||
RUN: sancov -merge %p/Inputs/test-linux_x86_64.0.symcov %p/Inputs/test-linux_x86_64.1.symcov| FileCheck --check-prefix=MERGE2 %s | ||
|
||
MERGE1: { | ||
MERGE1-NEXT: "covered-points" : ["4e132b", "4e1472", "4e1520", "4e1553", "4e1586"], | ||
MERGE1-NEXT: "binary-hash" : "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5", | ||
MERGE1-NEXT: "point-symbol-info" : { | ||
MERGE1-NEXT: "test/tools/sancov/Inputs/foo.cpp" : { | ||
MERGE1-NEXT: "foo()" : { | ||
MERGE1-NEXT: "4e178c" : "5:0" | ||
MERGE1-NEXT: } | ||
MERGE1-NEXT: }, | ||
MERGE1-NEXT: "test/tools/sancov/Inputs/test.cpp" : { | ||
MERGE1-NEXT: "bar(std::string)" : { | ||
MERGE1-NEXT: "4e132b" : "12:0" | ||
MERGE1-NEXT: }, | ||
MERGE1-NEXT: "main" : { | ||
MERGE1-NEXT: "4e1472" : "14:0", | ||
MERGE1-NEXT: "4e14c2" : "16:9", | ||
MERGE1-NEXT: "4e1520" : "17:5", | ||
MERGE1-NEXT: "4e1553" : "17:5", | ||
MERGE1-NEXT: "4e1586" : "17:5", | ||
MERGE1-NEXT: "4e1635" : "19:1", | ||
MERGE1-NEXT: "4e1690" : "17:5" | ||
MERGE1-NEXT: } | ||
MERGE1-NEXT: } | ||
MERGE1-NEXT: } | ||
MERGE1-NEXT: } | ||
|
||
MERGE2: { | ||
MERGE2-NEXT: "covered-points" : ["BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e132b", "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1472", "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e14c2", "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1520", "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1553", "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1586", "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e178c"], | ||
MERGE2-NEXT: "point-symbol-info" : { | ||
MERGE2-NEXT: "test/tools/sancov/Inputs/foo.cpp" : { | ||
MERGE2-NEXT: "foo()" : { | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e178c" : "5:0", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e178c" : "5:0" | ||
MERGE2-NEXT: } | ||
MERGE2-NEXT: }, | ||
MERGE2-NEXT: "test/tools/sancov/Inputs/test.cpp" : { | ||
MERGE2-NEXT: "bar(std::string)" : { | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e132b" : "12:0", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e132b" : "12:0" | ||
MERGE2-NEXT: }, | ||
MERGE2-NEXT: "main" : { | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1472" : "14:0", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e14c2" : "16:9", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1520" : "17:5", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1553" : "17:5", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1586" : "17:5", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1635" : "19:1", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1690" : "17:5", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1472" : "14:0", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e14c2" : "16:9", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1520" : "17:5", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1553" : "17:5", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1586" : "17:5", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1635" : "19:1", | ||
MERGE2-NEXT: "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5:4e1690" : "17:5" | ||
MERGE2-NEXT: } | ||
MERGE2-NEXT: } | ||
MERGE2-NEXT: } | ||
MERGE2-NEXT: } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
REQUIRES: x86_64-linux | ||
RUN: sancov -symbolize -strip_path_prefix="llvm/" %p/Inputs/test-linux_x86_64 %p/Inputs/test-linux_x86_64.0.sancov | FileCheck %s | ||
|
||
CHECK: { | ||
CHECK-NEXT: "covered-points" : ["4e132b", "4e1472", "4e1520", "4e1553", "4e1586"], | ||
CHECK-NEXT: "binary-hash" : "BB3CDD5045AED83906F6ADCC1C4DAF7E2596A6B5", | ||
CHECK-NEXT: "point-symbol-info" : { | ||
CHECK-NEXT: "test/tools/sancov/Inputs/foo.cpp" : { | ||
CHECK-NEXT: "foo()" : { | ||
CHECK-NEXT: "4e178c" : "5:0" | ||
CHECK-NEXT: } | ||
CHECK-NEXT: }, | ||
CHECK-NEXT: "test/tools/sancov/Inputs/test.cpp" : { | ||
CHECK-NEXT: "bar(std::string)" : { | ||
CHECK-NEXT: "4e132b" : "12:0" | ||
CHECK-NEXT: }, | ||
CHECK-NEXT: "main" : { | ||
CHECK-NEXT: "4e1472" : "14:0", | ||
CHECK-NEXT: "4e14c2" : "16:9", | ||
CHECK-NEXT: "4e1520" : "17:5", | ||
CHECK-NEXT: "4e1553" : "17:5", | ||
CHECK-NEXT: "4e1586" : "17:5", | ||
CHECK-NEXT: "4e1635" : "19:1", | ||
CHECK-NEXT: "4e1690" : "17:5" | ||
CHECK-NEXT: } | ||
CHECK-NEXT: } | ||
CHECK-NEXT: } | ||
CHECK-NEXT:} | ||
|
Oops, something went wrong.