[all-commits] [llvm/llvm-project] 78804e: [sanitizer_common] Recycle StackDepot memory

Z via All-commits all-commits at lists.llvm.org
Tue May 4 17:52:23 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 78804e6b20943f218f4b4a1867f600cf4744ffbd
      https://github.com/llvm/llvm-project/commit/78804e6b20943f218f4b4a1867f600cf4744ffbd
  Author: Jianzhou Zhao <jianzhouzh at google.com>
  Date:   2021-05-05 (Wed, 05 May 2021)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_stackdepot.h
    M compiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h
    M compiler-rt/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cpp

  Log Message:
  -----------
  [sanitizer_common] Recycle StackDepot memory

This relates to https://reviews.llvm.org/D95835.

In DFSan origin tracking we use StackDepot to record
stack traces and origin traces (like MSan origin tracking).

For at least two reasons, we wanted to control StackDepot's memory cost
1) We may use DFSan origin tracking to monitor programs that run for
   many days. This may eventually use too much memory for StackDepot.
2) DFSan supports flush shadow memory to reduce overhead. After flush,
   all existing IDs in StackDepot are not valid because no one will
   refer to them.


  Commit: 1fb612d060e7dc72610b4e83238e5561752fe737
      https://github.com/llvm/llvm-project/commit/1fb612d060e7dc72610b4e83238e5561752fe737
  Author: Jianzhou Zhao <jianzhouzh at google.com>
  Date:   2021-05-05 (Wed, 05 May 2021)

  Changed paths:
    M compiler-rt/lib/dfsan/CMakeLists.txt
    M compiler-rt/lib/dfsan/dfsan.cpp
    M compiler-rt/lib/dfsan/dfsan.h
    A compiler-rt/lib/dfsan/dfsan_allocator.cpp
    A compiler-rt/lib/dfsan/dfsan_allocator.h
    M compiler-rt/lib/dfsan/dfsan_flags.inc
    M compiler-rt/lib/dfsan/dfsan_thread.cpp
    M compiler-rt/lib/dfsan/dfsan_thread.h

  Log Message:
  -----------
  [dfsan] Add a DFSan allocator

This is a part of https://reviews.llvm.org/D101204

Reviewed By: morehouse

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


Compare: https://github.com/llvm/llvm-project/compare/d5069dace7c2...1fb612d060e7


More information about the All-commits mailing list