[PATCH] D88361: [sanitizer] Skip stack symbolization when not required for print format

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 08:30:08 PDT 2020


tejohnson created this revision.
tejohnson added a reviewer: vitalybuka.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
tejohnson requested review of this revision.

Adds a check to avoid symbolization when printing stack traces if the
stack_trace_format flag does not need it. While there is a symbolize
flag that can be turned off to skip some of the symbolization,
SymbolizePC() still unconditionally looks up the module name and offset.
Avoid invoking SymbolizePC() at all if not needed.

This is an efficiency improvement when dumping all stack traces as part
of the memory profiler in D87120 <https://reviews.llvm.org/D87120>, for large stripped apps where we want
to symbolize as a post pass.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88361

Files:
  compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
  compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp
  compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h
  compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88361.294506.patch
Type: text/x-patch
Size: 4361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200926/89318a1b/attachment.bin>


More information about the llvm-commits mailing list