1 #ifndef MEMPROF_MIBMAP_H_
2 #define MEMPROF_MIBMAP_H_
6 #include "profile/MemProfData.inc"
7 #include "sanitizer_common/sanitizer_addrhashmap.h"
8 #include "sanitizer_common/sanitizer_mutex.h"
12 struct LockedMemInfoBlock
{
13 __sanitizer::StaticSpinMutex mutex
;
14 ::llvm::memprof::MemInfoBlock mib
;
17 // The MIB map stores a mapping from stack ids to MemInfoBlocks.
18 typedef __sanitizer::AddrHashMap
<LockedMemInfoBlock
*, 200003> MIBMapTy
;
20 // Insert a new MemInfoBlock or merge with an existing block identified by the
22 void InsertOrMerge(const uptr Id
, const ::llvm::memprof::MemInfoBlock
&Block
,
25 } // namespace __memprof
27 #endif // MEMPROF_MIBMAP_H_