Performance: Add a set of visited SymbolFiles to the other FindFiles variant.
authorAdrian Prantl <aprantl@apple.com>
Tue, 12 Nov 2019 17:25:59 +0000 (09:25 -0800)
committerAdrian Prantl <aprantl@apple.com>
Tue, 12 Nov 2019 17:38:37 +0000 (09:38 -0800)
commit3b73dcdc9656e156c4380454150b8986c5b9aad1
treeb7c97bb950603e96ef85ab90c8ecc4481541f2d0
parent54a9b4c02ff57e9847e0c501578e51db6f73d3be
Performance: Add a set of visited SymbolFiles to the other FindFiles variant.

This is basically the same bug as in r260434.

SymbolFileDWARF::FindTypes has exponential worst-case when digging
through dependency DAG of .pcm files because each object file and .pcm
file may depend on an already-visited .pcm file, which may again have
dependencies. Fixed here by carrying a set of already visited
SymbolFiles around.

rdar://problem/56993424

Differential Revision: https://reviews.llvm.org/D70106
14 files changed:
lldb/include/lldb/Core/Module.h
lldb/include/lldb/Symbol/SymbolFile.h
lldb/source/Core/Module.cpp
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
lldb/source/Symbol/SymbolFile.cpp
lldb/tools/lldb-test/lldb-test.cpp