|
1 | 1 | ; RUN: split-file %s %t |
2 | 2 | ; COM: The text format only supports the latest version. |
| 3 | + |
| 4 | +; Verify that the YAML output is identical to the YAML input. |
| 5 | +; memprof-in.yaml has both heap profile records and data access profiles. |
3 | 6 | ; RUN: llvm-profdata merge --memprof-version=4 %t/memprof-in.yaml -o %t/memprof-out.indexed |
4 | 7 | ; RUN: llvm-profdata show --memory %t/memprof-out.indexed > %t/memprof-out.yaml |
5 | 8 | ; RUN: diff -b %t/memprof-in.yaml %t/memprof-out.yaml |
6 | 9 |
|
7 | | -; Verify that the YAML output is identical to the YAML input. |
| 10 | +; memprof-in-no-dap has empty data access profiles. |
| 11 | +; RUN: llvm-profdata merge --memprof-version=4 %t/memprof-in-no-dap.yaml -o %t/memprof-out.indexed |
| 12 | +; RUN: llvm-profdata show --memory %t/memprof-out.indexed > %t/memprof-out-no-dap.yaml |
| 13 | +; RUN: diff -b %t/memprof-in-no-dap.yaml %t/memprof-out-no-dap.yaml |
| 14 | + |
8 | 15 | ;--- memprof-in.yaml |
9 | 16 | --- |
10 | 17 | HeapProfileRecords: |
@@ -38,12 +45,48 @@ HeapProfileRecords: |
38 | 45 | DataAccessProfiles: |
39 | 46 | SampledRecords: |
40 | 47 | - Symbol: abcde |
| 48 | + Locations: |
| 49 | + - FileName: file2.h |
| 50 | + Line: 123 |
| 51 | + - FileName: file3.cpp |
| 52 | + Line: 456 |
41 | 53 | - Hash: 101010 |
42 | 54 | Locations: |
43 | | - - FileName: file |
| 55 | + - FileName: file.cpp |
44 | 56 | Line: 233 |
45 | 57 | KnownColdSymbols: |
46 | 58 | - foo |
47 | 59 | - bar |
48 | 60 | KnownColdHashes: [ 999, 1001 ] |
49 | 61 | ... |
| 62 | +;--- memprof-in-no-dap.yaml |
| 63 | +--- |
| 64 | +HeapProfileRecords: |
| 65 | + - GUID: 0xdeadbeef12345678 |
| 66 | + AllocSites: |
| 67 | + - Callstack: |
| 68 | + - { Function: 0x1111111111111111, LineOffset: 11, Column: 10, IsInlineFrame: true } |
| 69 | + - { Function: 0x2222222222222222, LineOffset: 22, Column: 20, IsInlineFrame: false } |
| 70 | + MemInfoBlock: |
| 71 | + AllocCount: 111 |
| 72 | + TotalSize: 222 |
| 73 | + TotalLifetime: 333 |
| 74 | + TotalLifetimeAccessDensity: 444 |
| 75 | + - Callstack: |
| 76 | + - { Function: 0x3333333333333333, LineOffset: 33, Column: 30, IsInlineFrame: false } |
| 77 | + - { Function: 0x4444444444444444, LineOffset: 44, Column: 40, IsInlineFrame: true } |
| 78 | + MemInfoBlock: |
| 79 | + AllocCount: 555 |
| 80 | + TotalSize: 666 |
| 81 | + TotalLifetime: 777 |
| 82 | + TotalLifetimeAccessDensity: 888 |
| 83 | + CallSites: |
| 84 | + - Frames: |
| 85 | + - { Function: 0x5555555555555555, LineOffset: 55, Column: 50, IsInlineFrame: true } |
| 86 | + - { Function: 0x6666666666666666, LineOffset: 66, Column: 60, IsInlineFrame: false } |
| 87 | + CalleeGuids: [ 0x100, 0x200 ] |
| 88 | + - Frames: |
| 89 | + - { Function: 0x7777777777777777, LineOffset: 77, Column: 70, IsInlineFrame: true } |
| 90 | + - { Function: 0x8888888888888888, LineOffset: 88, Column: 80, IsInlineFrame: false } |
| 91 | + CalleeGuids: [ 0x300 ] |
| 92 | +... |
0 commit comments