llvm-project/compiler-rt/lib/hwasan
Evgenii Stepanov 51aa61e74b [hwasan] Fix lock contention on thread creation.
Do not hold the free/live thread list lock longer than necessary.
This change speeds up the following benchmark 10x.

constexpr int kTopThreads = 50;
constexpr int kChildThreads = 20;
constexpr int kChildIterations = 8;

void Thread() {
  for (int i = 0; i < kChildIterations; ++i) {
    std::vector<std::thread> threads;
    for (int i = 0; i < kChildThreads; ++i)
      threads.emplace_back([](){});
    for (auto& t : threads)
      t.join();
  }
}

int main() {
  std::vector<std::thread> threads;
  for (int i = 0; i < kTopThreads; ++i)
    threads.emplace_back(Thread);
  for (auto& t : threads)
    t.join();
}

Differential Revision: https://reviews.llvm.org/D100348
2021-04-14 17:13:15 -07:00
..
scripts hwasan_symbolize: allow 0x in the address field 2020-02-03 18:23:48 -08:00
.clang-format [sanitizer] Remove unneeded blank lines 2018-05-09 00:44:26 +00:00
CMakeLists.txt [CMake] Remove cxx-headers from runtime deps 2020-10-30 20:03:38 -07:00
hwasan.cpp Revert "[sanitizer] Simplify GetTls with dl_iterate_phdr on Linux" 2021-04-05 19:00:18 -04:00
hwasan.h [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan.syms.extra
hwasan_allocator.cpp [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_allocator.h [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_blacklist.txt
hwasan_checks.h [HWASan] Refactor in preparation for x86 aliasing mode. NFC 2021-03-23 13:25:10 -07:00
hwasan_dynamic_shadow.cpp [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_dynamic_shadow.h hwasan: Add __hwasan_init_static() function. 2019-01-31 23:37:12 +00:00
hwasan_exceptions.cpp hwasan: Add missing SANITIZER_INTERFACE_ATTRIBUTE on __hwasan_personality_wrapper. 2019-10-18 22:51:38 +00:00
hwasan_flags.h [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_flags.inc [NFC] Remove tab from the source 2021-02-26 19:40:24 -08:00
hwasan_globals.cpp [HWASan] Add sizeof(global) in report even if symbols missing. 2020-06-09 13:02:13 -07:00
hwasan_globals.h [HWASan] Add sizeof(global) in report even if symbols missing. 2020-06-09 13:02:13 -07:00
hwasan_interceptors.cpp [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_interceptors_vfork.S [compiler-rt][aarch64] Add PAC-RET/BTI property to hwasan_interceptors_vfork.S 2021-04-12 17:17:33 -07:00
hwasan_interface_internal.h [hwasan] Implement error report callback. 2020-11-20 16:48:19 -08:00
hwasan_linux.cpp [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_malloc_bisect.h [compiler-rt] [hwasan] Replace INLINE with inline 2020-09-17 16:46:32 +02:00
hwasan_mapping.h [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_memintrinsics.cpp [HWASan] Use page aliasing on x86_64. 2021-03-25 07:04:14 -07:00
hwasan_new_delete.cpp [compiler-rt][hwasan] Add C++17 new/delete operators with alignment 2021-04-08 15:44:39 -07:00
hwasan_poisoning.cpp hwasan: Rename source files from cc to cpp 2019-02-27 15:44:03 +00:00
hwasan_poisoning.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
hwasan_report.cpp [sanitizer] Remove max_len parameter from InternalScopedString 2021-03-17 16:57:09 -07:00
hwasan_report.h hwasan: Improve precision of checks using short granule tags. 2019-07-09 20:22:36 +00:00
hwasan_setjmp.S [compiler-rt][aarch64] Add PAC-RET/BTI support to HWASAN. 2021-04-12 17:02:45 +02:00
hwasan_tag_mismatch_aarch64.S [compiler-rt][aarch64] Add PAC-RET/BTI support to HWASAN. 2021-04-12 17:02:45 +02:00
hwasan_thread.cpp [HWASan][NFC] Introduce constants for tag bits and masks. 2021-03-22 12:32:29 -07:00
hwasan_thread.h [HWASan][NFC] Introduce constants for tag bits and masks. 2021-03-22 12:32:29 -07:00
hwasan_thread_list.cpp hwasan: Rename source files from cc to cpp 2019-02-27 15:44:03 +00:00
hwasan_thread_list.h [hwasan] Fix lock contention on thread creation. 2021-04-14 17:13:15 -07:00
hwasan_type_test.cpp [compiler-rt] libhwasan interceptor ABI intercept longjmp/setjmp 2019-10-30 14:04:40 +00:00