|
13 | 13 | ; RUN: llvm-profdata show --memory %t/memprof-out-v3.indexed > %t/memprof-out-v3.yaml |
14 | 14 | ; RUN: diff -b %t/memprof-out-v3.yaml %t/memprof-in-v3.yaml |
15 | 15 |
|
| 16 | +; Make sure we can ingest a YAML profile containing AllocSites only. |
| 17 | +; That is, CallSites are missing. |
| 18 | +; RUN: llvm-profdata merge --memprof-version=4 %t/memprof-in-alloc-sites-only.yaml -o %t/memprof-out-alloc-sites-only.indexed |
| 19 | +; RUN: llvm-profdata show --memory %t/memprof-out-alloc-sites-only.indexed > %t/memprof-out-alloc-sites-only.yaml |
| 20 | +; RUN: diff -b %t/memprof-out-alloc-sites-only.yaml %t/memprof-in-alloc-sites-only.yaml |
| 21 | + |
| 22 | +; Make sure we can ingest a YAML profile containing CallSites only. |
| 23 | +; That is, AllocSites are missing. |
| 24 | +; RUN: llvm-profdata merge --memprof-version=4 %t/memprof-in-call-sites-only.yaml -o %t/memprof-out-call-sites-only.indexed |
| 25 | +; RUN: llvm-profdata show --memory %t/memprof-out-call-sites-only.indexed > %t/memprof-out-call-sites-only.yaml |
| 26 | +; RUN: diff -b %t/memprof-out-call-sites-only.yaml %t/memprof-in-call-sites-only.yaml |
| 27 | + |
16 | 28 | ; memprof-in-no-dap.yaml has empty data access profiles. |
17 | 29 | ; RUN: llvm-profdata merge --memprof-version=4 %t/memprof-in-no-dap.yaml -o %t/memprof-out.indexed |
18 | 30 | ; RUN: llvm-profdata show --memory %t/memprof-out.indexed > %t/memprof-out-no-dap.yaml |
@@ -117,6 +129,58 @@ HeapProfileRecords: |
117 | 129 | - { Function: 0x7777777777777777, LineOffset: 77, Column: 70, IsInlineFrame: true } |
118 | 130 | - { Function: 0x8888888888888888, LineOffset: 88, Column: 80, IsInlineFrame: false } |
119 | 131 | ... |
| 132 | +;--- memprof-in-alloc-sites-only.yaml |
| 133 | +--- |
| 134 | +# MemProfSummary: |
| 135 | +# Total contexts: 2 |
| 136 | +# Total cold contexts: 0 |
| 137 | +# Total hot contexts: 0 |
| 138 | +# Maximum cold context total size: 0 |
| 139 | +# Maximum warm context total size: 666 |
| 140 | +# Maximum hot context total size: 0 |
| 141 | +--- |
| 142 | +HeapProfileRecords: |
| 143 | + - GUID: 0xdeadbeef12345678 |
| 144 | + AllocSites: |
| 145 | + - Callstack: |
| 146 | + - { Function: 0x1111111111111111, LineOffset: 11, Column: 10, IsInlineFrame: true } |
| 147 | + - { Function: 0x2222222222222222, LineOffset: 22, Column: 20, IsInlineFrame: false } |
| 148 | + MemInfoBlock: |
| 149 | + AllocCount: 111 |
| 150 | + TotalSize: 222 |
| 151 | + TotalLifetime: 333 |
| 152 | + TotalLifetimeAccessDensity: 444 |
| 153 | + - Callstack: |
| 154 | + - { Function: 0x3333333333333333, LineOffset: 33, Column: 30, IsInlineFrame: false } |
| 155 | + - { Function: 0x4444444444444444, LineOffset: 44, Column: 40, IsInlineFrame: true } |
| 156 | + MemInfoBlock: |
| 157 | + AllocCount: 555 |
| 158 | + TotalSize: 666 |
| 159 | + TotalLifetime: 777 |
| 160 | + TotalLifetimeAccessDensity: 888 |
| 161 | +... |
| 162 | +;--- memprof-in-call-sites-only.yaml |
| 163 | +--- |
| 164 | +# MemProfSummary: |
| 165 | +# Total contexts: 0 |
| 166 | +# Total cold contexts: 0 |
| 167 | +# Total hot contexts: 0 |
| 168 | +# Maximum cold context total size: 0 |
| 169 | +# Maximum warm context total size: 0 |
| 170 | +# Maximum hot context total size: 0 |
| 171 | +--- |
| 172 | +HeapProfileRecords: |
| 173 | + - GUID: 0xdeadbeef12345678 |
| 174 | + CallSites: |
| 175 | + - Frames: |
| 176 | + - { Function: 0x5555555555555555, LineOffset: 55, Column: 50, IsInlineFrame: true } |
| 177 | + - { Function: 0x6666666666666666, LineOffset: 66, Column: 60, IsInlineFrame: false } |
| 178 | + CalleeGuids: [ 0x100, 0x200 ] |
| 179 | + - Frames: |
| 180 | + - { Function: 0x7777777777777777, LineOffset: 77, Column: 70, IsInlineFrame: true } |
| 181 | + - { Function: 0x8888888888888888, LineOffset: 88, Column: 80, IsInlineFrame: false } |
| 182 | + CalleeGuids: [ 0x300 ] |
| 183 | +... |
120 | 184 | ;--- memprof-in-no-dap.yaml |
121 | 185 | --- |
122 | 186 | # MemProfSummary: |
|
0 commit comments