Commit Graph

17 Commits

Author SHA1 Message Date
Vitaly Buka c86e7ec42c [sanitizer] Remove traces from the header
This will simplify removing id proposed by @dvyukov on D111183
Also now we have more flexiliby for traces compressio they
are not interleaving with uncompressable headers.

Depends on D111256.

Differential Revision: https://reviews.llvm.org/D111274
2021-10-07 13:54:01 -07:00
Vitaly Buka 8f3e52538d [NFC][sanitizer] Remove global PersistentAllocator
This way is easier to track memory usage and do other
incremental refactorings.

Differential Revision: https://reviews.llvm.org/D111256
2021-10-07 13:54:01 -07:00
Vitaly Buka b5b1b3aef1 [sanitizer] Switch to StackDepotNode to 64bit hash
Now we can avoid scanning the stack on fast path.
The price is the false stack trace with probability of the hash collision.
This increase performance of lsan by 6% and pre-requirement for stack compression.

Depends on D111182.

Reviewed By: morehouse, dvyukov

Differential Revision: https://reviews.llvm.org/D111183
2021-10-06 10:45:11 -07:00
Vitaly Buka 3129aa5caf [NFC][sanitizers] Add StackDepotBase Node::hash_type
Depends on D111177.

Differential Revision: https://reviews.llvm.org/D111182
2021-10-05 20:54:06 -07:00
Vitaly Buka 84afd02525 [sanitizer] Fix Android bot
We don't need to check for equality, we need to check
that storage is large enough.
2021-10-05 13:08:16 -07:00
Vitaly Buka 6fab808f6f [NFC][sanitizer] Combine MSAN data in single field
Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D111118
2021-10-05 12:34:02 -07:00
Vitaly Buka 548aa9022e [NFC][sanitizer] Lazy init in StackDepotReverseMap 2021-09-30 19:26:34 -07:00
Vitaly Buka 5c3568d01f [NFC][sanitizer] Add const into method 2021-09-30 17:16:34 -07:00
Vitaly Buka 7c1128f3bb [NFC][sanitizer] Return StackDepotStats by value
Differential Revision: https://reviews.llvm.org/D110644
2021-09-28 15:42:21 -07:00
Vitaly Buka bfa50250b6 [NFC][sanitizer] Clang-format some code 2021-09-28 11:10:15 -07:00
Jianzhou Zhao bf4e1cf80a Revert "[sanitizer_common] Recycle StackDepot memory"
This reverts commit 78804e6b20.
2021-05-05 00:57:34 +00:00
Jianzhou Zhao 78804e6b20 [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.
2021-05-05 00:51:45 +00:00
Vitaly Buka 4e74480e02 [NFC][sanitizer] Simplify InternalLowerBound 2020-12-29 14:01:43 -08:00
Teresa Johnson a90229d6ce [sanitizer] Add facility to print the full StackDepot
Split out of D87120 (memory profiler). Added unit testing of the new
printing facility.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D87792
2020-09-18 00:51:22 -07:00
Teresa Johnson 6e475e1288 Revert "[sanitizer] Add facility to print the full StackDepot"
This reverts commit 2ffaa9a173.

There were 2 reported bot failures that need more investigation:

http://lab.llvm.org:8011/builders/sanitizer-windows/builds/69871/steps/stage%201%20check/logs/stdio

   This one is in my new test.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/39187/steps/check-fuzzer/logs/stdio

   This one seems completely unrelated.
2020-09-17 21:18:16 -07:00
Teresa Johnson 2ffaa9a173 [sanitizer] Add facility to print the full StackDepot
Split out of D87120 (memory profiler). Added unit testing of the new
printing facility.

Differential Revision: https://reviews.llvm.org/D87792
2020-09-17 18:12:22 -07:00
Nico Weber 65492d959b compiler-rt: Rename .cc file in lib/sanitizer_common to .cpp
See https://reviews.llvm.org/D58620 for discussion, and for the commands
I ran. In addition I also ran

  for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done

and manually updated (many) references to renamed files found by that.

llvm-svn: 367463
2019-07-31 18:51:27 +00:00