[all-commits] [llvm/llvm-project] 27d616: Improve llvm-gsymutil performance in quiet mode.

Greg Clayton via All-commits all-commits at lists.llvm.org
Wed Aug 9 00:34:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27d6161b64369557bedc1bf1580a48e64d16c19b
      https://github.com/llvm/llvm-project/commit/27d6161b64369557bedc1bf1580a48e64d16c19b
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
    M llvm/include/llvm/DebugInfo/GSYM/DwarfTransformer.h
    M llvm/include/llvm/DebugInfo/GSYM/ObjectFileTransformer.h
    M llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
    M llvm/lib/DebugInfo/GSYM/ObjectFileTransformer.cpp
    M llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
    M llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp

  Log Message:
  -----------
  Improve llvm-gsymutil performance in quiet mode.

The GSYM code alwasy logging to streams even in quiet mode. When in quiet mode we would use the "nulls()" stream to avoid logging to the terminal, but this still caused logging functions to be called on DWARFDie objects and other messages which were quite expensive and not needed if we weren't logging anything. This patch switches some logs in performant areas to be "raw_ostream *" values and if the ostream pointer is NULL, then we don't call the expensive logging functions on DWARFDie and other objects which will improve performance.

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




More information about the All-commits mailing list