[PATCH] D147270: [DebugInfo] Support more than 2 operands in DWARF operations

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 14:05:49 PDT 2023


scott.linder added a comment.

In D147270#4304833 <https://reviews.llvm.org/D147270#4304833>, @CarlosAlbertoEnciso wrote:

> @scott.linder: Sorry for my delay. As pointed out by @dblaikie, it would be interesting to see the memory usage, specially for the `logical view`. Thanks.

Thank you for taking a look!

Is there a good target you have in mind for the benchmark? I seem to hit an assertion when dogfooding RelWithDebInfo binaries:

  $ git log --oneline | head -1
  0dec49cb3466 [mlir][vector] Remove unused variable `srcShape`.
  
  $ build/bin/llvm-debuginfo-analyzer --print=symbols build-relwithdebinfo/bin/llvm-tblgen
  llvm-debuginfo-analyzer: /home/slinder1/llvm-project/main/llvm/include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h:102: virtual v
  oid llvm::logicalview::LVSymbol::setReference(llvm::logicalview::LVElement *): Assertion `(!Element || isa<LVSymbol>(Element)) &
  & "Invalid element"' failed.
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
  Stack dump:
  0.      Program arguments: build/bin/llvm-debuginfo-analyzer --print=symbols build-relwithdebinfo/bin/llvm-tblgen
   #0 0x0000000001ab6017 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build/bin/llvm-debuginfo-analyzer+0x1ab6017)
   #1 0x0000000001ab3dee llvm::sys::RunSignalHandlers() (build/bin/llvm-debuginfo-analyzer+0x1ab3dee)
   #2 0x0000000001ab668f SignalHandler(int) Signals.cpp:0:0
   #3 0x00007f9a91add420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
   #4 0x00007f9a9136e00b raise /build/glibc-SzIz7B/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
   #5 0x00007f9a9134d859 abort /build/glibc-SzIz7B/glibc-2.31/stdlib/abort.c:81:7
   #6 0x00007f9a9134d729 get_sysdep_segment_value /build/glibc-SzIz7B/glibc-2.31/intl/loadmsgcat.c:509:8
   #7 0x00007f9a9134d729 _nl_load_domain /build/glibc-SzIz7B/glibc-2.31/intl/loadmsgcat.c:970:34
   #8 0x00007f9a9135efd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
   #9 0x000000000189be81 llvm::logicalview::LVSymbol::setReference(llvm::logicalview::LVElement*) LVSymbol.cpp:0:0
  #10 0x000000000191c9ee llvm::logicalview::LVELFReader::processOneDie(llvm::DWARFDie const&, llvm::logicalview::LVScope*, llvm::D
  WARFDie&) (build/bin/llvm-debuginfo-analyzer+0x191c9ee)
  #11 0x000000000191d6c9 llvm::logicalview::LVELFReader::traverseDieAndChildren(llvm::DWARFDie&, llvm::logicalview::LVScope*, llvm
  ::DWARFDie&) (build/bin/llvm-debuginfo-analyzer+0x191d6c9)
  #12 0x000000000191d741 llvm::logicalview::LVELFReader::traverseDieAndChildren(llvm::DWARFDie&, llvm::logicalview::LVScope*, llvm
  ::DWARFDie&) (build/bin/llvm-debuginfo-analyzer+0x191d741)
  #13 0x000000000191ef75 llvm::logicalview::LVELFReader::createScopes() (build/bin/llvm-debuginfo-analyzer+0x191ef75)
  #14 0x000000000186507d llvm::logicalview::LVReader::doLoad() (build/bin/llvm-debuginfo-analyzer+0x186507d)
  #15 0x00000000018a2768 llvm::logicalview::LVReaderHandler::createReader(llvm::StringRef, std::vector<std::unique_ptr<llvm::logic
  alview::LVReader, std::default_delete<llvm::logicalview::LVReader>>, std::allocator<std::unique_ptr<llvm::logicalview::LVReader,
   std::default_delete<llvm::logicalview::LVReader>>>>&, llvm::PointerUnion<llvm::object::ObjectFile*, llvm::pdb::PDBFile*>&, llvm
  ::StringRef, llvm::StringRef) (build/bin/llvm-debuginfo-analyzer+0x18a2768)
  #16 0x00000000018a505d llvm::logicalview::LVReaderHandler::handleObject(std::vector<std::unique_ptr<llvm::logicalview::LVReader,
   std::default_delete<llvm::logicalview::LVReader>>, std::allocator<std::unique_ptr<llvm::logicalview::LVReader, std::default_del
  ete<llvm::logicalview::LVReader>>>>&, llvm::StringRef, llvm::object::Binary&) (build/bin/llvm-debuginfo-analyzer+0x18a505d)
  #17 0x00000000018a4046 llvm::logicalview::LVReaderHandler::handleBuffer(std::vector<std::unique_ptr<llvm::logicalview::LVReader,
   std::default_delete<llvm::logicalview::LVReader>>, std::allocator<std::unique_ptr<llvm::logicalview::LVReader, std::default_del
  ete<llvm::logicalview::LVReader>>>>&, llvm::StringRef, llvm::MemoryBufferRef, llvm::StringRef) (build/bin/llvm-debuginfo-analyze
  r+0x18a4046)
  #18 0x00000000018a4de5 llvm::logicalview::LVReaderHandler::handleFile(std::vector<std::unique_ptr<llvm::logicalview::LVReader, s
  td::default_delete<llvm::logicalview::LVReader>>, std::allocator<std::unique_ptr<llvm::logicalview::LVReader, std::default_delet
  e<llvm::logicalview::LVReader>>>>&, llvm::StringRef, llvm::StringRef) (build/bin/llvm-debuginfo-analyzer+0x18a4de5)
  #19 0x00000000018a1fa7 llvm::logicalview::LVReaderHandler::createReaders() (build/bin/llvm-debuginfo-analyzer+0x18a1fa7)
  #20 0x00000000018a1e2f llvm::logicalview::LVReaderHandler::process() (build/bin/llvm-debuginfo-analyzer+0x18a1e2f)
  #21 0x0000000001441730 main (build/bin/llvm-debuginfo-analyzer+0x1441730)
  #22 0x00007f9a9134f083 __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:342:3
  #23 0x0000000001440bce _start (build/bin/llvm-debuginfo-analyzer+0x1440bce)
  Aborted (core dumped)

I've also tried `llc`, `clang`, and `llvm-debuginfo-analyzer` itself, all hit the same assert. Is there something I might be doing wrong on my end?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147270/new/

https://reviews.llvm.org/D147270



More information about the llvm-commits mailing list