X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fexperimental%2Fsymbolizer%2FElfCache.h;h=378baa205238b7a796edf5018cf0fe9c64751e18;hb=4824fb8374d19f411676eb5dfefb507dd3e747fd;hp=671b263b4a8991fd3b8aad58577922e762a40cb5;hpb=321542683a01c3f334047531e9b487f047129775;p=folly.git diff --git a/folly/experimental/symbolizer/ElfCache.h b/folly/experimental/symbolizer/ElfCache.h index 671b263b..378baa20 100644 --- a/folly/experimental/symbolizer/ElfCache.h +++ b/folly/experimental/symbolizer/ElfCache.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef FOLLY_SYMBOLIZER_ELFCACHE_H_ -#define FOLLY_SYMBOLIZER_ELFCACHE_H_ +#pragma once #include #include // for PATH_MAX @@ -30,10 +29,17 @@ #include #include +#include +#include #include namespace folly { namespace symbolizer { +/** + * Number of ELF files loaded by the dynamic loader. + */ +size_t countLoadedElfFiles(); + class ElfCacheBase { public: virtual std::shared_ptr getFile(StringPiece path) = 0; @@ -117,10 +123,7 @@ class ElfCache : public ElfCacheBase { static std::shared_ptr filePtr(const std::shared_ptr& e); size_t capacity_; - std::unordered_map< - StringPiece, - std::shared_ptr, - StringPieceHash> files_; + std::unordered_map, Hash> files_; typedef boost::intrusive::list< Entry, @@ -130,5 +133,3 @@ class ElfCache : public ElfCacheBase { }; }} // namespaces - -#endif /* FOLLY_SYMBOLIZER_ELFCACHE_H_ */