llvm-project/compiler-rt/lib/profile
Pirama Arumuga Nainar 6caa8da072 [profile] In Android, do not mkdir() dirs in GCOV_PREFIX
Summary:
In Android, attempting to mkdir() or even stat() top-level directories
like /data causes noisy selinux denials.  During whole-system coverage
instrumentation, this causes a deluge of noisy messages that drown out
legitimate selinux denials, that should be audited and fixed.

To avoid this, skip creating any directory in GCOV_PREFIX (thereby
assuming that it exists).

- Android platform ensures that the GCOV_PREFIX used in Android is
created and read/writable by all processes.
- This only affects the Android platform (by checking against
__ANDROID_API_FUTURE__) and for apps built with Clang coverage, the
runtime will still create any non-existent parent directories for the
coverage files.

Reviewers: srhines, davidxl

Subscribers: krytarowski, #sanitizers, danalbert, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D65245

llvm-svn: 367064
2019-07-25 22:10:56 +00:00
..
CMakeLists.txt [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
GCDAProfiling.c Silence -Wformat warnings about GetLastError returning ULONG 2019-02-07 23:58:48 +00:00
InstrProfData.inc Fix some gcc warnings in compiler-rt 2019-05-10 14:15:13 +00:00
InstrProfiling.c This change adds an API to allow setting the flag to indicate that the profile data has been dumped to the file. 2019-05-20 20:02:20 +00:00
InstrProfiling.h (Reland with changes) Adding a function for setting coverage output file. 2019-06-24 21:32:50 +00:00
InstrProfilingBuffer.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingFile.c (Reland with changes) Adding a function for setting coverage output file. 2019-06-24 21:32:50 +00:00
InstrProfilingInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingMerge.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingMergeFile.c Set hidden attribute on lprofMergeValueProfData 2019-02-14 21:38:40 +00:00
InstrProfilingNameVar.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingPlatformDarwin.c Reland compiler-rt support for order file instrumentation. 2019-03-08 15:30:56 +00:00
InstrProfilingPlatformFuchsia.c [compiler-rt] Set the ZX_VMO_RESIZABLE option for zx_vmo_create 2019-05-02 17:24:53 +00:00
InstrProfilingPlatformLinux.c Reland compiler-rt support for order file instrumentation. 2019-03-08 15:30:56 +00:00
InstrProfilingPlatformOther.c Reland compiler-rt support for order file instrumentation. 2019-03-08 15:30:56 +00:00
InstrProfilingPlatformWindows.c Reland compiler-rt support for order file instrumentation. 2019-03-08 15:30:56 +00:00
InstrProfilingPort.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingRuntime.cc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstrProfilingUtil.c [profile] In Android, do not mkdir() dirs in GCOV_PREFIX 2019-07-25 22:10:56 +00:00
InstrProfilingUtil.h (Reland with changes) Adding a function for setting coverage output file. 2019-06-24 21:32:50 +00:00
InstrProfilingValue.c [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
InstrProfilingWriter.c Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WindowsMMap.c [GCOV] Close file mapping handle on Windows, so flushed gcda files can be removed while the process is in execution 2018-11-07 09:38:26 +00:00
WindowsMMap.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00