|
27 | 27 | #include "llvm/IR/ConstantRange.h" |
28 | 28 | #include "llvm/IR/GlobalValue.h" |
29 | 29 | #include "llvm/IR/Module.h" |
| 30 | +#include "llvm/ProfileData/MemProfCommon.h" |
30 | 31 | #include "llvm/Support/Allocator.h" |
31 | 32 | #include "llvm/Support/Compiler.h" |
32 | 33 | #include "llvm/Support/InterleavedRange.h" |
@@ -306,14 +307,6 @@ template <> struct DenseMapInfo<ValueInfo> { |
306 | 307 | static unsigned getHashValue(ValueInfo I) { return hash_value(I.getRef()); } |
307 | 308 | }; |
308 | 309 |
|
309 | | -// For optional hinted size reporting, holds a pair of the full stack id |
310 | | -// (pre-trimming, from the full context in the profile), and the associated |
311 | | -// total profiled size. |
312 | | -struct ContextTotalSize { |
313 | | - uint64_t FullStackId; |
314 | | - uint64_t TotalSize; |
315 | | -}; |
316 | | - |
317 | 310 | /// Summary of memprof callsite metadata. |
318 | 311 | struct CallsiteInfo { |
319 | 312 | // Actual callee function. |
@@ -350,19 +343,6 @@ inline raw_ostream &operator<<(raw_ostream &OS, const CallsiteInfo &SNI) { |
350 | 343 | return OS; |
351 | 344 | } |
352 | 345 |
|
353 | | -// Allocation type assigned to an allocation reached by a given context. |
354 | | -// More can be added, now this is cold, notcold and hot. |
355 | | -// Values should be powers of two so that they can be ORed, in particular to |
356 | | -// track allocations that have different behavior with different calling |
357 | | -// contexts. |
358 | | -enum class AllocationType : uint8_t { |
359 | | - None = 0, |
360 | | - NotCold = 1, |
361 | | - Cold = 2, |
362 | | - Hot = 4, |
363 | | - All = 7 // This should always be set to the OR of all values. |
364 | | -}; |
365 | | - |
366 | 346 | /// Summary of a single MIB in a memprof metadata on allocations. |
367 | 347 | struct MIBInfo { |
368 | 348 | // The allocation type for this profiled context. |
|
0 commit comments