diff options
| author | Max Moroz <mmoroz@chromium.org> | 2019-05-20 20:02:20 +0000 | 
|---|---|---|
| committer | Max Moroz <mmoroz@chromium.org> | 2019-05-20 20:02:20 +0000 | 
| commit | 52fa90a348c1bed5ecbcc0965c57d67e5ec45d5a (patch) | |
| tree | 806f574627c25d40afd87b14ee80fe71df61ec8d /compiler-rt/lib/profile/InstrProfiling.c | |
| parent | 4aee1b5b0b9a844d44b890c66bc7e48532262d6f (diff) | |
| download | bcm5719-llvm-52fa90a348c1bed5ecbcc0965c57d67e5ec45d5a.tar.gz bcm5719-llvm-52fa90a348c1bed5ecbcc0965c57d67e5ec45d5a.zip | |
This change adds an API to allow setting the flag to indicate that the profile data has been dumped to the file.
Summary:
The main use is for users to disable dumping profile data to the file
for certain processes in case the processes don't have permission to
write to the disks, and trying to do so would result in side effects
such as crashes.
Patch by Yuke Liao (@liaoyuke).
Additional context (Chromium use case):
- https://bugs.chromium.org/p/chromium/issues/detail?id=842424
- https://bugs.chromium.org/p/chromium/issues/detail?id=957655
- https://chromium-review.googlesource.com/c/chromium/src/+/1610093
Reviewers: Dor1s, vsk, davidxl
Reviewed By: Dor1s, davidxl
Subscribers: delcypher, davidxl, sajjadm, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D62078
llvm-svn: 361194
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfiling.c')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfiling.c | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/compiler-rt/lib/profile/InstrProfiling.c b/compiler-rt/lib/profile/InstrProfiling.c index 299cf31777b..f3787715e70 100644 --- a/compiler-rt/lib/profile/InstrProfiling.c +++ b/compiler-rt/lib/profile/InstrProfiling.c @@ -35,6 +35,10 @@ COMPILER_RT_VISIBILITY void lprofSetProfileDumped() {    ProfileDumped = 1;  } +COMPILER_RT_VISIBILITY void __llvm_profile_set_dumped() { +  lprofSetProfileDumped(); +} +  /* Return the number of bytes needed to add to SizeInBytes to make it   *   the result a multiple of 8.   */ | 

