[clang] Handle __declspec() attributes in using
[llvm-project.git] / compiler-rt / lib / memprof / memprof_mibmap.h
bloba7cd420464e8b57fa65b64049f3b762e357c95db
1 #ifndef MEMPROF_MIBMAP_H_
2 #define MEMPROF_MIBMAP_H_
4 #include <stdint.h>
6 #include "profile/MemProfData.inc"
7 #include "sanitizer_common/sanitizer_addrhashmap.h"
8 #include "sanitizer_common/sanitizer_mutex.h"
10 namespace __memprof {
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
21 // stack id.
22 void InsertOrMerge(const uptr Id, const ::llvm::memprof::MemInfoBlock &Block,
23 MIBMapTy &Map);
25 } // namespace __memprof
27 #endif // MEMPROF_MIBMAP_H_