-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CSSPGO] Support of CS profiles in extended binary format.
This change brings up support of context-sensitive profiles in the format of extended binary. Existing sample profile reader/writer/merger code is being tweaked to reflect the fact of bracketed input contexts, like (`[...]`). The paired brackets are also needed in extbinary profiles because we don't yet have an otherwise good way to tell calling contexts apart from regular function names since the context delimiter `@` can somehow serve as a part of the C++ mangled names. Reviewed By: wmi, wenlei Differential Revision: https://reviews.llvm.org/D95547
- Loading branch information
Showing
10 changed files
with
113 additions
and
50 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
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
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
4 changes: 4 additions & 0 deletions
4
llvm/test/Transforms/SampleProfile/profile-context-tracker.ll
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,36 @@ | ||
[main:3 @ _Z5funcAi:1 @ _Z8funcLeafi]:1467299:11 | ||
0: 6 | ||
1: 6 | ||
3: 287884 | ||
4: 287864 _Z3fibi:315608 | ||
15: 23 | ||
[main:3.1 @ _Z5funcBi:1 @ _Z8funcLeafi]:500853:20 | ||
0: 15 | ||
1: 15 | ||
3: 74946 | ||
4: 74941 _Z3fibi:82359 | ||
10: 23324 | ||
11: 23327 _Z3fibi:25228 | ||
15: 11 | ||
[main]:154:0 | ||
2: 12 | ||
3: 18 _Z5funcAi:11 | ||
3.1: 18 _Z5funcBi:19 | ||
[external:12 @ main]:154:12 | ||
2: 12 | ||
3: 10 _Z5funcAi:7 | ||
3.1: 10 _Z5funcBi:11 | ||
[main:3.1 @ _Z5funcBi]:120:19 | ||
0: 19 | ||
1: 19 _Z8funcLeafi:20 | ||
3: 12 | ||
[externalA:17 @ _Z5funcBi]:120:3 | ||
0: 3 | ||
1: 3 | ||
[external:10 @ _Z5funcBi]:120:10 | ||
0: 10 | ||
1: 10 | ||
[main:3 @ _Z5funcAi]:99:11 | ||
0: 10 | ||
1: 10 _Z8funcLeafi:11 | ||
3: 24 |
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,4 @@ | ||
RUN: llvm-profdata merge --sample --text -output=%t.proftext %S/Inputs/cs-sample.proftext | ||
RUN: diff -b %t.proftext %S/Inputs/cs-sample.proftext | ||
RUN: llvm-profdata merge --sample --extbinary %p/Inputs/cs-sample.proftext -o %t.prof && llvm-profdata merge --sample --text %t.prof -o %t1.proftext | ||
RUN: diff -b %t1.proftext %S/Inputs/cs-sample.proftext |
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