Skip to content

Commit ee73d24

Browse files
committed
[MemProf] Collect access density statistics during profiling
Track min/max/avg access density (accesses per byte and accesses per byte per lifetime second) metrics directly during profiling. This allows more accurate use of these metrics in profile analysis and use, instead of trying to compute them from already aggregated data in the profile. This required regenerating some of the raw profile and executable inputs for a few tests. While here, make the llvm-profdata memprof tests more resilient to differences in things like memory mapping, timestamps and cpu ids to make future test updates easier. Differential Revision: https://reviews.llvm.org/D141558
1 parent 0bab2ec commit ee73d24

File tree

19 files changed

+133
-111
lines changed

19 files changed

+133
-111
lines changed

clang/test/CodeGen/Inputs/memprof.exe

-66.4 KB
Binary file not shown.
104 Bytes
Binary file not shown.

compiler-rt/include/profile/MIBEntryDef.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ MIBEntryDef(NumLifetimeOverlaps = 16, NumLifetimeOverlaps, uint32_t)
4545
MIBEntryDef(NumSameAllocCpu = 17, NumSameAllocCpu, uint32_t)
4646
MIBEntryDef(NumSameDeallocCpu = 18, NumSameDeallocCpu, uint32_t)
4747
MIBEntryDef(DataTypeId = 19, DataTypeId, uint64_t)
48+
MIBEntryDef(TotalAccessDensity = 20, TotalAccessDensity, uint64_t)
49+
MIBEntryDef(MinAccessDensity = 21, MinAccessDensity, uint32_t)
50+
MIBEntryDef(MaxAccessDensity = 22, MaxAccessDensity, uint32_t)
51+
MIBEntryDef(TotalLifetimeAccessDensity = 23, TotalLifetimeAccessDensity, uint64_t)
52+
MIBEntryDef(MinLifetimeAccessDensity = 24, MinLifetimeAccessDensity, uint32_t)
53+
MIBEntryDef(MaxLifetimeAccessDensity = 25, MaxLifetimeAccessDensity, uint32_t)

compiler-rt/include/profile/MemProfData.inc

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
(uint64_t)'o' << 24 | (uint64_t)'f' << 16 | (uint64_t)'r' << 8 | (uint64_t)129)
3333

3434
// The version number of the raw binary format.
35-
#define MEMPROF_RAW_VERSION 1ULL
35+
#define MEMPROF_RAW_VERSION 2ULL
3636

3737
namespace llvm {
3838
namespace memprof {
@@ -127,6 +127,19 @@ MemInfoBlock(uint32_t Size, uint64_t AccessCount, uint32_t AllocTs,
127127
TotalLifetime = DeallocTimestamp - AllocTimestamp;
128128
MinLifetime = TotalLifetime;
129129
MaxLifetime = TotalLifetime;
130+
// Access density is accesses per byte. Multiply by 100 to include the
131+
// fractional part.
132+
TotalAccessDensity = AccessCount * 100 / Size;
133+
MinAccessDensity = TotalAccessDensity;
134+
MaxAccessDensity = TotalAccessDensity;
135+
// Lifetime access density is the access density per second of lifetime.
136+
// Multiply by 1000 to convert denominator lifetime to seconds (using a
137+
// minimum lifetime of 1ms to avoid divide by 0. Do the multiplication first
138+
// to reduce truncations to 0.
139+
TotalLifetimeAccessDensity =
140+
TotalAccessDensity * 1000 / (TotalLifetime ? TotalLifetime : 1);
141+
MinLifetimeAccessDensity = TotalLifetimeAccessDensity;
142+
MaxLifetimeAccessDensity = TotalLifetimeAccessDensity;
130143
AllocCpuId = AllocCpu;
131144
DeallocCpuId = DeallocCpu;
132145
NumMigratedCpu = AllocCpuId != DeallocCpuId;
@@ -147,6 +160,24 @@ void Merge(const MemInfoBlock &newMIB) {
147160
MinLifetime = newMIB.MinLifetime < MinLifetime ? newMIB.MinLifetime : MinLifetime;
148161
MaxLifetime = newMIB.MaxLifetime > MaxLifetime ? newMIB.MaxLifetime : MaxLifetime;
149162

163+
TotalAccessDensity += newMIB.TotalAccessDensity;
164+
MinAccessDensity = newMIB.MinAccessDensity < MinAccessDensity
165+
? newMIB.MinAccessDensity
166+
: MinAccessDensity;
167+
MaxAccessDensity = newMIB.MaxAccessDensity > MaxAccessDensity
168+
? newMIB.MaxAccessDensity
169+
: MaxAccessDensity;
170+
171+
TotalLifetimeAccessDensity += newMIB.TotalLifetimeAccessDensity;
172+
MinLifetimeAccessDensity =
173+
newMIB.MinLifetimeAccessDensity < MinLifetimeAccessDensity
174+
? newMIB.MinLifetimeAccessDensity
175+
: MinLifetimeAccessDensity;
176+
MaxLifetimeAccessDensity =
177+
newMIB.MaxLifetimeAccessDensity > MaxLifetimeAccessDensity
178+
? newMIB.MaxLifetimeAccessDensity
179+
: MaxLifetimeAccessDensity;
180+
150181
// We know newMIB was deallocated later, so just need to check if it was
151182
// allocated before last one deallocated.
152183
NumLifetimeOverlaps += newMIB.AllocTimestamp < DeallocTimestamp;

llvm/include/llvm/ProfileData/MIBEntryDef.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ MIBEntryDef(NumLifetimeOverlaps = 16, NumLifetimeOverlaps, uint32_t)
4545
MIBEntryDef(NumSameAllocCpu = 17, NumSameAllocCpu, uint32_t)
4646
MIBEntryDef(NumSameDeallocCpu = 18, NumSameDeallocCpu, uint32_t)
4747
MIBEntryDef(DataTypeId = 19, DataTypeId, uint64_t)
48+
MIBEntryDef(TotalAccessDensity = 20, TotalAccessDensity, uint64_t)
49+
MIBEntryDef(MinAccessDensity = 21, MinAccessDensity, uint32_t)
50+
MIBEntryDef(MaxAccessDensity = 22, MaxAccessDensity, uint32_t)
51+
MIBEntryDef(TotalLifetimeAccessDensity = 23, TotalLifetimeAccessDensity, uint64_t)
52+
MIBEntryDef(MinLifetimeAccessDensity = 24, MinLifetimeAccessDensity, uint32_t)
53+
MIBEntryDef(MaxLifetimeAccessDensity = 25, MaxLifetimeAccessDensity, uint32_t)

llvm/include/llvm/ProfileData/MemProfData.inc

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
(uint64_t)'o' << 24 | (uint64_t)'f' << 16 | (uint64_t)'r' << 8 | (uint64_t)129)
3333

3434
// The version number of the raw binary format.
35-
#define MEMPROF_RAW_VERSION 1ULL
35+
#define MEMPROF_RAW_VERSION 2ULL
3636

3737
namespace llvm {
3838
namespace memprof {
@@ -127,6 +127,19 @@ MemInfoBlock(uint32_t Size, uint64_t AccessCount, uint32_t AllocTs,
127127
TotalLifetime = DeallocTimestamp - AllocTimestamp;
128128
MinLifetime = TotalLifetime;
129129
MaxLifetime = TotalLifetime;
130+
// Access density is accesses per byte. Multiply by 100 to include the
131+
// fractional part.
132+
TotalAccessDensity = AccessCount * 100 / Size;
133+
MinAccessDensity = TotalAccessDensity;
134+
MaxAccessDensity = TotalAccessDensity;
135+
// Lifetime access density is the access density per second of lifetime.
136+
// Multiply by 1000 to convert denominator lifetime to seconds (using a
137+
// minimum lifetime of 1ms to avoid divide by 0. Do the multiplication first
138+
// to reduce truncations to 0.
139+
TotalLifetimeAccessDensity =
140+
TotalAccessDensity * 1000 / (TotalLifetime ? TotalLifetime : 1);
141+
MinLifetimeAccessDensity = TotalLifetimeAccessDensity;
142+
MaxLifetimeAccessDensity = TotalLifetimeAccessDensity;
130143
AllocCpuId = AllocCpu;
131144
DeallocCpuId = DeallocCpu;
132145
NumMigratedCpu = AllocCpuId != DeallocCpuId;
@@ -147,6 +160,24 @@ void Merge(const MemInfoBlock &newMIB) {
147160
MinLifetime = newMIB.MinLifetime < MinLifetime ? newMIB.MinLifetime : MinLifetime;
148161
MaxLifetime = newMIB.MaxLifetime > MaxLifetime ? newMIB.MaxLifetime : MaxLifetime;
149162

163+
TotalAccessDensity += newMIB.TotalAccessDensity;
164+
MinAccessDensity = newMIB.MinAccessDensity < MinAccessDensity
165+
? newMIB.MinAccessDensity
166+
: MinAccessDensity;
167+
MaxAccessDensity = newMIB.MaxAccessDensity > MaxAccessDensity
168+
? newMIB.MaxAccessDensity
169+
: MaxAccessDensity;
170+
171+
TotalLifetimeAccessDensity += newMIB.TotalLifetimeAccessDensity;
172+
MinLifetimeAccessDensity =
173+
newMIB.MinLifetimeAccessDensity < MinLifetimeAccessDensity
174+
? newMIB.MinLifetimeAccessDensity
175+
: MinLifetimeAccessDensity;
176+
MaxLifetimeAccessDensity =
177+
newMIB.MaxLifetimeAccessDensity > MaxLifetimeAccessDensity
178+
? newMIB.MaxLifetimeAccessDensity
179+
: MaxLifetimeAccessDensity;
180+
150181
// We know newMIB was deallocated later, so just need to check if it was
151182
// allocated before last one deallocated.
152183
NumLifetimeOverlaps += newMIB.AllocTimestamp < DeallocTimestamp;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

llvm/test/tools/llvm-profdata/Inputs/inline.memprofraw

100644100755
136 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

llvm/test/tools/llvm-profdata/memprof-basic.test

Lines changed: 28 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -39,58 +39,20 @@ additional allocations which do not originate from the main binary are pruned.
3939

4040
CHECK: MemprofProfile:
4141
CHECK-NEXT: Summary:
42-
CHECK-NEXT: Version: 1
43-
CHECK-NEXT: NumSegments: 9
42+
CHECK-NEXT: Version: 2
43+
CHECK-NEXT: NumSegments: {{[0-9]+}}
4444
CHECK-NEXT: NumMibInfo: 2
4545
CHECK-NEXT: NumAllocFunctions: 1
4646
CHECK-NEXT: NumStackOffsets: 2
4747
CHECK-NEXT: Segments:
4848
CHECK-NEXT: -
4949
CHECK-NEXT: BuildId: <None>
50-
CHECK-NEXT: Start: 0x200000
51-
CHECK-NEXT: End: 0x298000
52-
CHECK-NEXT: Offset: 0x0
50+
CHECK-NEXT: Start: 0x{{[0-9]+}}
51+
CHECK-NEXT: End: 0x{{[0-9]+}}
52+
CHECK-NEXT: Offset: 0x{{[0-9]+}}
5353
CHECK-NEXT: -
54-
CHECK-NEXT: BuildId: <None>
55-
CHECK-NEXT: Start: 0x7FFFF7C7C000
56-
CHECK-NEXT: End: 0x7FFFF7DC5000
57-
CHECK-NEXT: Offset: 0x26000
58-
CHECK-NEXT: -
59-
CHECK-NEXT: BuildId: <None>
60-
CHECK-NEXT: Start: 0x7FFFF7E1E000
61-
CHECK-NEXT: End: 0x7FFFF7E30000
62-
CHECK-NEXT: Offset: 0x3000
63-
CHECK-NEXT: -
64-
CHECK-NEXT: BuildId: <None>
65-
CHECK-NEXT: Start: 0x7FFFF7E36000
66-
CHECK-NEXT: End: 0x7FFFF7E38000
67-
CHECK-NEXT: Offset: 0x1000
68-
CHECK-NEXT: -
69-
CHECK-NEXT: BuildId: <None>
70-
CHECK-NEXT: Start: 0x7FFFF7E4A000
71-
CHECK-NEXT: End: 0x7FFFF7EE5000
72-
CHECK-NEXT: Offset: 0xF000
73-
CHECK-NEXT: -
74-
CHECK-NEXT: BuildId: <None>
75-
CHECK-NEXT: Start: 0x7FFFF7F83000
76-
CHECK-NEXT: End: 0x7FFFF7F87000
77-
CHECK-NEXT: Offset: 0x3000
78-
CHECK-NEXT: -
79-
CHECK-NEXT: BuildId: <None>
80-
CHECK-NEXT: Start: 0x7FFFF7F92000
81-
CHECK-NEXT: End: 0x7FFFF7FA1000
82-
CHECK-NEXT: Offset: 0x7000
83-
CHECK-NEXT: -
84-
CHECK-NEXT: BuildId: <None>
85-
CHECK-NEXT: Start: 0x7FFFF7FD0000
86-
CHECK-NEXT: End: 0x7FFFF7FD2000
87-
CHECK-NEXT: Offset: 0x0
88-
CHECK-NEXT: -
89-
CHECK-NEXT: BuildId: <None>
90-
CHECK-NEXT: Start: 0x7FFFF7FD3000
91-
CHECK-NEXT: End: 0x7FFFF7FF3000
92-
CHECK-NEXT: Offset: 0x1000
93-
CHECK-NEXT: Records:
54+
55+
CHECK: Records:
9456
CHECK-NEXT: -
9557
CHECK-NEXT: FunctionGUID: {{[0-9]+}}
9658
CHECK-NEXT: AllocSites:
@@ -110,24 +72,30 @@ CHECK-NEXT: MaxAccessCount: 2
11072
CHECK-NEXT: TotalSize: 10
11173
CHECK-NEXT: MinSize: 10
11274
CHECK-NEXT: MaxSize: 10
113-
CHECK-NEXT: AllocTimestamp: 986
114-
CHECK-NEXT: DeallocTimestamp: 986
75+
CHECK-NEXT: AllocTimestamp: {{[0-9]+}}
76+
CHECK-NEXT: DeallocTimestamp: {{[0-9]+}}
11577
CHECK-NEXT: TotalLifetime: 0
11678
CHECK-NEXT: MinLifetime: 0
11779
CHECK-NEXT: MaxLifetime: 0
118-
CHECK-NEXT: AllocCpuId: 56
119-
CHECK-NEXT: DeallocCpuId: 56
80+
CHECK-NEXT: AllocCpuId: {{[0-9]+}}
81+
CHECK-NEXT: DeallocCpuId: {{[0-9]+}}
12082
CHECK-NEXT: NumMigratedCpu: 0
12183
CHECK-NEXT: NumLifetimeOverlaps: 0
12284
CHECK-NEXT: NumSameAllocCpu: 0
12385
CHECK-NEXT: NumSameDeallocCpu: 0
12486
CHECK-NEXT: DataTypeId: {{[0-9]+}}
87+
CHECK-NEXT: TotalAccessDensity: 20
88+
CHECK-NEXT: MinAccessDensity: 20
89+
CHECK-NEXT: MaxAccessDensity: 20
90+
CHECK-NEXT: TotalLifetimeAccessDensity: 20000
91+
CHECK-NEXT: MinLifetimeAccessDensity: 20000
92+
CHECK-NEXT: MaxLifetimeAccessDensity: 20000
12593
CHECK-NEXT: -
12694
CHECK-NEXT: Callstack:
12795
CHECK-NEXT: -
12896
CHECK-NEXT: Function: {{[0-9]+}}
12997
CHECK-NEXT: SymbolName: main
130-
CHECK-NEXT: LineOffset: 5
98+
CHECK-NEXT: LineOffset: 4
13199
CHECK-NEXT: Column: 15
132100
CHECK-NEXT: Inline: 0
133101
CHECK-NEXT: MemInfoBlock:
@@ -138,15 +106,21 @@ CHECK-NEXT: MaxAccessCount: 2
138106
CHECK-NEXT: TotalSize: 10
139107
CHECK-NEXT: MinSize: 10
140108
CHECK-NEXT: MaxSize: 10
141-
CHECK-NEXT: AllocTimestamp: 987
142-
CHECK-NEXT: DeallocTimestamp: 987
109+
CHECK-NEXT: AllocTimestamp: {{[0-9]+}}
110+
CHECK-NEXT: DeallocTimestamp: {{[0-9]+}}
143111
CHECK-NEXT: TotalLifetime: 0
144112
CHECK-NEXT: MinLifetime: 0
145113
CHECK-NEXT: MaxLifetime: 0
146-
CHECK-NEXT: AllocCpuId: 56
147-
CHECK-NEXT: DeallocCpuId: 56
114+
CHECK-NEXT: AllocCpuId: {{[0-9]+}}
115+
CHECK-NEXT: DeallocCpuId: {{[0-9]+}}
148116
CHECK-NEXT: NumMigratedCpu: 0
149117
CHECK-NEXT: NumLifetimeOverlaps: 0
150118
CHECK-NEXT: NumSameAllocCpu: 0
151119
CHECK-NEXT: NumSameDeallocCpu: 0
152120
CHECK-NEXT: DataTypeId: {{[0-9]+}}
121+
CHECK-NEXT: TotalAccessDensity: 20
122+
CHECK-NEXT: MinAccessDensity: 20
123+
CHECK-NEXT: MaxAccessDensity: 20
124+
CHECK-NEXT: TotalLifetimeAccessDensity: 20000
125+
CHECK-NEXT: MinLifetimeAccessDensity: 20000
126+
CHECK-NEXT: MaxLifetimeAccessDensity: 20000

llvm/test/tools/llvm-profdata/memprof-inline.test

Lines changed: 27 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -40,58 +40,20 @@ RUN: llvm-profdata show --memory %p/Inputs/inline.memprofraw --profiled-binary %
4040

4141
CHECK: MemprofProfile:
4242
CHECK-NEXT: Summary:
43-
CHECK-NEXT: Version: 1
44-
CHECK-NEXT: NumSegments: 9
43+
CHECK-NEXT: Version: 2
44+
CHECK-NEXT: NumSegments: {{[0-9]+}}
4545
CHECK-NEXT: NumMibInfo: 2
4646
CHECK-NEXT: NumAllocFunctions: 2
4747
CHECK-NEXT: NumStackOffsets: 1
4848
CHECK-NEXT: Segments:
4949
CHECK-NEXT: -
5050
CHECK-NEXT: BuildId: <None>
51-
CHECK-NEXT: Start: 0x200000
52-
CHECK-NEXT: End: 0x29B000
53-
CHECK-NEXT: Offset: 0x0
51+
CHECK-NEXT: Start: 0x{{[0-9]+}}
52+
CHECK-NEXT: End: 0x{{[0-9]+}}
53+
CHECK-NEXT: Offset: 0x{{[0-9]+}}
5454
CHECK-NEXT: -
55-
CHECK-NEXT: BuildId: <None>
56-
CHECK-NEXT: Start: 0x7F5871485000
57-
CHECK-NEXT: End: 0x7F58715CD000
58-
CHECK-NEXT: Offset: 0x26000
59-
CHECK-NEXT: -
60-
CHECK-NEXT: BuildId: <None>
61-
CHECK-NEXT: Start: 0x7F587162D000
62-
CHECK-NEXT: End: 0x7F587163F000
63-
CHECK-NEXT: Offset: 0x3000
64-
CHECK-NEXT: -
65-
CHECK-NEXT: BuildId: <None>
66-
CHECK-NEXT: Start: 0x7F5871646000
67-
CHECK-NEXT: End: 0x7F5871648000
68-
CHECK-NEXT: Offset: 0x2000
69-
CHECK-NEXT: -
70-
CHECK-NEXT: BuildId: <None>
71-
CHECK-NEXT: Start: 0x7F587165A000
72-
CHECK-NEXT: End: 0x7F58716F4000
73-
CHECK-NEXT: Offset: 0xF000
74-
CHECK-NEXT: -
75-
CHECK-NEXT: BuildId: <None>
76-
CHECK-NEXT: Start: 0x7F5871791000
77-
CHECK-NEXT: End: 0x7F5871795000
78-
CHECK-NEXT: Offset: 0x3000
79-
CHECK-NEXT: -
80-
CHECK-NEXT: BuildId: <None>
81-
CHECK-NEXT: Start: 0x7F58717A0000
82-
CHECK-NEXT: End: 0x7F58717AF000
83-
CHECK-NEXT: Offset: 0x7000
84-
CHECK-NEXT: -
85-
CHECK-NEXT: BuildId: <None>
86-
CHECK-NEXT: Start: 0x7F58717D6000
87-
CHECK-NEXT: End: 0x7F58717FA000
88-
CHECK-NEXT: Offset: 0x1000
89-
CHECK-NEXT: -
90-
CHECK-NEXT: BuildId: <None>
91-
CHECK-NEXT: Start: 0x7FFFC77BD000
92-
CHECK-NEXT: End: 0x7FFFC77BF000
93-
CHECK-NEXT: Offset: 0x0
94-
CHECK-NEXT: Records:
55+
56+
CHECK: Records:
9557
CHECK-NEXT: -
9658
CHECK-NEXT: FunctionGUID: 15505678318020221912
9759
CHECK-NEXT: AllocSites:
@@ -129,18 +91,24 @@ CHECK-NEXT: MaxAccessCount: 1
12991
CHECK-NEXT: TotalSize: 1
13092
CHECK-NEXT: MinSize: 1
13193
CHECK-NEXT: MaxSize: 1
132-
CHECK-NEXT: AllocTimestamp: 894
133-
CHECK-NEXT: DeallocTimestamp: 894
94+
CHECK-NEXT: AllocTimestamp: {{[0-9]+}}
95+
CHECK-NEXT: DeallocTimestamp: {{[0-9]+}}
13496
CHECK-NEXT: TotalLifetime: 0
13597
CHECK-NEXT: MinLifetime: 0
13698
CHECK-NEXT: MaxLifetime: 0
137-
CHECK-NEXT: AllocCpuId: 23
138-
CHECK-NEXT: DeallocCpuId: 23
99+
CHECK-NEXT: AllocCpuId: {{[0-9]+}}
100+
CHECK-NEXT: DeallocCpuId: {{[0-9]+}}
139101
CHECK-NEXT: NumMigratedCpu: 0
140102
CHECK-NEXT: NumLifetimeOverlaps: 0
141103
CHECK-NEXT: NumSameAllocCpu: 0
142104
CHECK-NEXT: NumSameDeallocCpu: 0
143105
CHECK-NEXT: DataTypeId: {{[0-9]+}}
106+
CHECK-NEXT: TotalAccessDensity: 100
107+
CHECK-NEXT: MinAccessDensity: 100
108+
CHECK-NEXT: MaxAccessDensity: 100
109+
CHECK-NEXT: TotalLifetimeAccessDensity: 100000
110+
CHECK-NEXT: MinLifetimeAccessDensity: 100000
111+
CHECK-NEXT: MaxLifetimeAccessDensity: 100000
144112
CHECK-NEXT: -
145113
CHECK-NEXT: FunctionGUID: 6699318081062747564
146114
CHECK-NEXT: AllocSites:
@@ -178,18 +146,24 @@ CHECK-NEXT: MaxAccessCount: 1
178146
CHECK-NEXT: TotalSize: 1
179147
CHECK-NEXT: MinSize: 1
180148
CHECK-NEXT: MaxSize: 1
181-
CHECK-NEXT: AllocTimestamp: 894
182-
CHECK-NEXT: DeallocTimestamp: 894
149+
CHECK-NEXT: AllocTimestamp: {{[0-9]+}}
150+
CHECK-NEXT: DeallocTimestamp: {{[0-9]+}}
183151
CHECK-NEXT: TotalLifetime: 0
184152
CHECK-NEXT: MinLifetime: 0
185153
CHECK-NEXT: MaxLifetime: 0
186-
CHECK-NEXT: AllocCpuId: 23
187-
CHECK-NEXT: DeallocCpuId: 23
154+
CHECK-NEXT: AllocCpuId: {{[0-9]+}}
155+
CHECK-NEXT: DeallocCpuId: {{[0-9]+}}
188156
CHECK-NEXT: NumMigratedCpu: 0
189157
CHECK-NEXT: NumLifetimeOverlaps: 0
190158
CHECK-NEXT: NumSameAllocCpu: 0
191159
CHECK-NEXT: NumSameDeallocCpu: 0
192160
CHECK-NEXT: DataTypeId: {{[0-9]+}}
161+
CHECK-NEXT: TotalAccessDensity: 100
162+
CHECK-NEXT: MinAccessDensity: 100
163+
CHECK-NEXT: MaxAccessDensity: 100
164+
CHECK-NEXT: TotalLifetimeAccessDensity: 100000
165+
CHECK-NEXT: MinLifetimeAccessDensity: 100000
166+
CHECK-NEXT: MaxLifetimeAccessDensity: 100000
193167
CHECK-NEXT: CallSites:
194168
CHECK-NEXT: -
195169
CHECK-NEXT: -

llvm/test/tools/llvm-profdata/memprof-multi.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ We expect 2 MIB entries, 1 each for the malloc calls in the program.
4040

4141
CHECK: MemprofProfile:
4242
CHECK-NEXT: Summary:
43-
CHECK-NEXT: Version: 1
44-
CHECK-NEXT: NumSegments: 9
43+
CHECK-NEXT: Version: 2
44+
CHECK-NEXT: NumSegments: {{[0-9]+}}
4545
CHECK-NEXT: NumMibInfo: 2
4646
CHECK-NEXT: NumAllocFunctions: 1
4747
CHECK-NEXT: NumStackOffsets: 2

0 commit comments

Comments
 (0)