-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[profile] Implement a non-mmap path when reading profile files from a non-local filesystem #131177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b817019
[profile] Implement a non-mmap path when reading profile files from a…
f764d1e
code review
c3c037b
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 153a141
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 0680091
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 549b019
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 43f4926
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia bfe6fa9
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia ee17bfa
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 99602d3
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 8e10f3f
Update compiler-rt/test/profile/instrprof-no-mmap-during-merging.c
w2yehia 04d66b2
Update compiler-rt/test/profile/Posix/instrprof-fork.c
w2yehia 987eeeb
define COMPILER_RT_UNUSED
6f55e68
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 189ac38
Update compiler-rt/test/profile/Posix/instrprof-fork.c
w2yehia 18550f9
Update compiler-rt/lib/profile/InstrProfilingUtil.c
w2yehia 9112370
code review: rename enumerator names MM_* to MS_*
a26ea14
code review: use default enum values instread of bit flags.
66340b6
code review: rename function is_local_filesystem and env var LLVM_NO_…
3fd025e
fix testcase
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
26 changes: 26 additions & 0 deletions
26
compiler-rt/test/profile/instrprof-no-mmap-during-merging.c
This file contains hidden or 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,26 @@ | ||
// RUN: mkdir -p %t.d && cd %t.d | ||
// RUN: rm -f *.profraw | ||
// RUN: %clang_pgogen %s -o a.out | ||
|
||
// Need to run a.out twice. On the second time, a merge will occur, which will | ||
// trigger an mmap. | ||
// RUN: ./a.out | ||
// RUN: llvm-profdata show default_*.profraw --all-functions --counts --memop-sizes 2>&1 | FileCheck %s -check-prefix=PROFDATA | ||
// RUN: env LLVM_PROFILE_NO_MMAP=1 LLVM_PROFILE_VERBOSE=1 ./a.out 2>&1 | FileCheck %s | ||
// RUN: llvm-profdata show default_*.profraw --all-functions --counts --memop-sizes 2>&1 | FileCheck %s -check-prefix=PROFDATA2 | ||
|
||
// CHECK: could not use mmap; using fread instead | ||
// PROFDATA: Block counts: [1] | ||
// PROFDATA: [ 0, 0, 1 ] | ||
// PROFDATA: Maximum function count: 1 | ||
// PROFDATA2: Block counts: [2] | ||
// PROFDATA2: [ 0, 0, 2 ] | ||
// PROFDATA2: Maximum function count: 2 | ||
|
||
#include <string.h> | ||
int ar[8]; | ||
int main() { | ||
memcpy(ar, ar + 2, ar[0]); | ||
memcpy(ar, ar + 2, ar[2]); | ||
return ar[2]; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.