proxygen
|
#include <ElfCache.h>
Classes | |
struct | Entry |
Public Member Functions | |
ElfCache (size_t capacity) | |
std::shared_ptr< ElfFile > | getFile (StringPiece path) override |
Public Member Functions inherited from folly::symbolizer::ElfCacheBase | |
virtual | ~ElfCacheBase () |
Private Types | |
typedef boost::intrusive::list_member_hook | LruLink |
typedef boost::intrusive::list< Entry, boost::intrusive::member_hook< Entry, LruLink,&Entry::lruLink >, boost::intrusive::constant_time_size< false > > | LruList |
Static Private Member Functions | |
static std::shared_ptr< ElfFile > | filePtr (const std::shared_ptr< Entry > &e) |
Private Attributes | |
std::mutex | mutex_ |
size_t | capacity_ |
std::unordered_map< StringPiece, std::shared_ptr< Entry >, Hash > | files_ |
LruList | lruList_ |
General-purpose ELF file cache.
LRU of given capacity. MT-safe (uses locking). Not async-signal-safe.
Definition at line 118 of file ElfCache.h.
|
private |
Definition at line 127 of file ElfCache.h.
|
private |
Definition at line 144 of file ElfCache.h.
|
explicit |
Definition at line 92 of file ElfCache.cpp.
|
staticprivate |
Definition at line 129 of file ElfCache.cpp.
Referenced by getFile().
|
overridevirtual |
Implements folly::symbolizer::ElfCacheBase.
Definition at line 94 of file ElfCache.cpp.
References capacity_, filePtr(), files_, folly::symbolizer::ElfFile::kSuccess, folly::lock(), lruList_, mutex_, and folly::Range< Iter >::str().
|
private |
Definition at line 137 of file ElfCache.h.
Referenced by getFile().
|
private |
Definition at line 138 of file ElfCache.h.
Referenced by getFile().
|
private |
Definition at line 145 of file ElfCache.h.
Referenced by getFile().
|
private |
Definition at line 125 of file ElfCache.h.
Referenced by getFile().