[all-commits] [llvm/llvm-project] 74f667: [sanitizer_common] Several Solaris procmaps fixes
rorth via All-commits
all-commits at lists.llvm.org
Fri Jul 15 21:59:35 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 74f6672e59d2cc9fdc95abfd28f527f00c808c07
https://github.com/llvm/llvm-project/commit/74f6672e59d2cc9fdc95abfd28f527f00c808c07
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2022-07-16 (Sat, 16 Jul 2022)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_procmaps_solaris.cpp
Log Message:
-----------
[sanitizer_common] Several Solaris procmaps fixes
Since the introduction of GoogleTest sharding in D122251
<https://reviews.llvm.org/D122251>, some of the Solaris sanitizer tests
have been running extremly long (up to an hour) while they took mere
seconds before. Initial investigation suggests that massive lock
contention in Solaris procfs is involved here.
However, there's an easy way to somewhat reduce the impact: while the
current `ReadProcMaps` uses `ReadFileToBuffer` to read `/proc/self/xmap`,
that function primarily caters to Linux procfs reporting file sizes of 0
while the size on Solaris is accurate. This patch makes use of that,
reducing the number of syscalls involved and reducing the runtime of
affected tests by a factor of 4.
Besides, it handles shared mappings and doesn't call `readlink` for unnamed
map entries.
Tested on `sparcv9-sun-solaris2.11` and `amd64-pc-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D129837
More information about the All-commits
mailing list