summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [PDB] Remove all clone() methods.Zachary Turner2018-09-121-4/+0
| | | | | | | These are dead code and encourage poor usage patterns, so I'm removing them. They weren't called anywhere anyway. llvm-svn: 342093
* [PDB] Create a SymbolCache class.Zachary Turner2018-09-071-2/+2
| | | | | | | | | | | | | Part of the responsibility of the native PDB reader is to cache symbols the first time they are accessed, so they can then be looked up by an ID. Furthermore, we need to resolve type indices to records that we vend to the user, and other things. Previously this code was all thrown together a bit haphazardly in the native session class, but it makes sense to collect all of this into a single class whose sole responsibility is to manage the collection of known symbols. llvm-svn: 341608
* [PDB] Refactor the PDB symbol classes to fix a reuse bug.Zachary Turner2018-09-051-12/+9
| | | | | | | | | | | | | | | | | | | | The way DIA SDK works is that when you request a symbol, it gets assigned an internal identifier that is unique for the life of the session. You can then use this identifier to get back the same symbol, with all of the same internal state that it had before, even if you "destroyed" the original copy of the object you had. This didn't work properly in our native implementation, and if you destroyed an object for a particular symbol, then requested the same symbol again, it would get assigned a new ID and you'd get a fresh copy of the object. In order to fix this some refactoring had to happen to properly reuse cached objects. Some unittests are added to verify that symbol reuse is taking place, making use of the new unittest input feature. llvm-svn: 341503
* Introduce symbol cache to PDB NativeSessionAdrian McCarthy2017-06-281-3/+1
| | | | | | | | | | | | | Instead of creating symbols directly in the findChildren methods of the native symbol implementations, they will rely on the NativeSession to act as a factory for these types. This lets NativeSession cache the NativeRawSymbols in its new symbol cache and makes that cache the source of unique IDs for the symbols. Right now, this affects only NativeCompilandSymbols. There's no external change yet, so I think the existing tests are still sufficient. Coming soon are patches to extend this to built-in types and enums. llvm-svn: 306610
* Add IDs and clone methods to NativeRawSymbolAdrian McCarthy2017-06-221-1/+1
| | | | | | | | | | | | All NativeRawSymbols will have a unique symbol ID (retrievable via getSymIndexId). For now, these are initialized to 0, but soon the NativeSession will be responsible for creating the raw symbols, and it will assign unique IDs. The symbol cache in the NativeSession will also require the ability to clone raw symbols, so I've provided implementations for that as well. llvm-svn: 306042
* [PDB] Don't build the entire source file list up front.Zachary Turner2017-05-041-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I tried to run llvm-pdbdump on a very large (~1.5GB) PDB to try and identify show-stopping performance problems. This patch addresses the first such problem. When loading the DBI stream, before anyone has even tried to access a single record, we build an in memory map of every source file for every module. In the particular PDB I was using, this was over 85 million files. Specifically, the complexity is O(m*n) where m is the number of modules and n is the average number of source files (including headers) per module. The whole reason for doing this was so that we could have constant time access to any module and any of its source file lists. However, we can still get O(1) access to the source file list for a given module with a simple O(m) precomputation, and access to the list of modules is already O(1) anyway. So this patches reduces the O(m*n) up-front precomputation to an O(m) one, where n is ~6,500 and n*m is about 85 million in my pathological test case. Differential Revision: https://reviews.llvm.org/D32870 llvm-svn: 302205
* Introduce NativeEnumModules and NativeCompilandSymbolAdrian McCarthy2017-03-151-0/+52
Together, these allow lldb-pdbdump to list all the modules from a PDB using a native reader (rather than DIA). Note that I'll probably be specializing NativeRawSymbol in a subsequent patch. Differential Revision: https://reviews.llvm.org/D30956 llvm-svn: 297883
OpenPOWER on IntegriCloud