[all-commits] [llvm/llvm-project] 4d5b1d: [sanitizer] Skip stack symbolization when not requ...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Wed Oct 7 15:39:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d5b1de40eccc7ffcfb859cef407e5f30bee77f8
      https://github.com/llvm/llvm-project/commit/4d5b1de40eccc7ffcfb859cef407e5f30bee77f8
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

  Changed paths:
    M compiler-rt/lib/hwasan/hwasan_report.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h
    M compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
    M compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_printer_test.cpp
    M compiler-rt/lib/tsan/rtl/tsan_report.cpp
    M compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cpp

  Log Message:
  -----------
  [sanitizer] Skip stack symbolization when not required for print format

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, for large stripped apps where we want
to symbolize as a post pass.

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




More information about the All-commits mailing list