[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / tools / llvm-profdata / memprof-basic.test
blob8eaa2fa1013f44ce0a58a628b2ecb71e3ae66d23
1 REQUIRES: x86_64-linux
3 To update the inputs used below run Inputs/update_memprof_inputs.sh /path/to/updated/clang
4 RUN: llvm-profdata show --memory %p/Inputs/basic.memprofraw --profiled-binary %p/Inputs/basic.memprofexe -o - | FileCheck %s
6 We expect 2 MIB entries, 1 each for the malloc calls in the program. Any
7 additional allocations which do not originate from the main binary are pruned.
9 CHECK:  MemprofProfile:
10 CHECK-NEXT:   Summary:
11 CHECK-NEXT:     Version: 3
12 CHECK-NEXT:     NumSegments: {{[0-9]+}}
13 CHECK-NEXT:     NumMibInfo: 2
14 CHECK-NEXT:     NumAllocFunctions: 1
15 CHECK-NEXT:     NumStackOffsets: 2
16 CHECK-NEXT:   Segments:
17 CHECK-NEXT:   -
18 CHECK-NEXT:     BuildId: {{[[:xdigit:]]+}}
19 CHECK-NEXT:     Start: 0x{{[[:xdigit:]]+}}
20 CHECK-NEXT:     End: 0x{{[[:xdigit:]]+}}
21 CHECK-NEXT:     Offset: 0x{{[[:xdigit:]]+}}
22 CHECK-NEXT:   -
24 CHECK:   Records:
25 CHECK-NEXT:   -
26 CHECK-NEXT:     FunctionGUID: {{[0-9]+}}
27 CHECK-NEXT:     AllocSites:
28 CHECK-NEXT:     -
29 CHECK-NEXT:       Callstack:
30 CHECK-NEXT:       -
31 CHECK-NEXT:         Function: {{[0-9]+}}
32 CHECK-NEXT:         SymbolName: main
33 CHECK-NEXT:         LineOffset: 1
34 CHECK-NEXT:         Column: 21
35 CHECK-NEXT:         Inline: 0
36 CHECK-NEXT:       MemInfoBlock:
37 CHECK-NEXT:         AllocCount: 1
38 CHECK-NEXT:         TotalAccessCount: 2
39 CHECK-NEXT:         MinAccessCount: 2
40 CHECK-NEXT:         MaxAccessCount: 2
41 CHECK-NEXT:         TotalSize: 10
42 CHECK-NEXT:         MinSize: 10
43 CHECK-NEXT:         MaxSize: 10
44 CHECK-NEXT:         AllocTimestamp: {{[0-9]+}}
45 CHECK-NEXT:         DeallocTimestamp: {{[0-9]+}}
46 CHECK-NEXT:         TotalLifetime: 0
47 CHECK-NEXT:         MinLifetime: 0
48 CHECK-NEXT:         MaxLifetime: 0
49 CHECK-NEXT:         AllocCpuId: {{[0-9]+}}
50 CHECK-NEXT:         DeallocCpuId: {{[0-9]+}}
51 CHECK-NEXT:         NumMigratedCpu: 0
52 CHECK-NEXT:         NumLifetimeOverlaps: 0
53 CHECK-NEXT:         NumSameAllocCpu: 0
54 CHECK-NEXT:         NumSameDeallocCpu: 0
55 CHECK-NEXT:         DataTypeId: {{[0-9]+}}
56 CHECK-NEXT:         TotalAccessDensity: 20
57 CHECK-NEXT:         MinAccessDensity: 20
58 CHECK-NEXT:         MaxAccessDensity: 20
59 CHECK-NEXT:         TotalLifetimeAccessDensity: 20000
60 CHECK-NEXT:         MinLifetimeAccessDensity: 20000
61 CHECK-NEXT:         MaxLifetimeAccessDensity: 20000
62 CHECK-NEXT:     -
63 CHECK-NEXT:       Callstack:
64 CHECK-NEXT:       -
65 CHECK-NEXT:         Function: {{[0-9]+}}
66 CHECK-NEXT:         SymbolName: main
67 CHECK-NEXT:         LineOffset: 4
68 CHECK-NEXT:         Column: 15
69 CHECK-NEXT:         Inline: 0
70 CHECK-NEXT:       MemInfoBlock:
71 CHECK-NEXT:         AllocCount: 1
72 CHECK-NEXT:         TotalAccessCount: 2
73 CHECK-NEXT:         MinAccessCount: 2
74 CHECK-NEXT:         MaxAccessCount: 2
75 CHECK-NEXT:         TotalSize: 10
76 CHECK-NEXT:         MinSize: 10
77 CHECK-NEXT:         MaxSize: 10
78 CHECK-NEXT:         AllocTimestamp: {{[0-9]+}}
79 CHECK-NEXT:         DeallocTimestamp: {{[0-9]+}}
80 CHECK-NEXT:         TotalLifetime: 0
81 CHECK-NEXT:         MinLifetime: 0
82 CHECK-NEXT:         MaxLifetime: 0
83 CHECK-NEXT:         AllocCpuId: {{[0-9]+}}
84 CHECK-NEXT:         DeallocCpuId: {{[0-9]+}}
85 CHECK-NEXT:         NumMigratedCpu: 0
86 CHECK-NEXT:         NumLifetimeOverlaps: 0
87 CHECK-NEXT:         NumSameAllocCpu: 0
88 CHECK-NEXT:         NumSameDeallocCpu: 0
89 CHECK-NEXT:         DataTypeId: {{[0-9]+}}
90 CHECK-NEXT:         TotalAccessDensity: 20
91 CHECK-NEXT:         MinAccessDensity: 20
92 CHECK-NEXT:         MaxAccessDensity: 20
93 CHECK-NEXT:         TotalLifetimeAccessDensity: 20000
94 CHECK-NEXT:         MinLifetimeAccessDensity: 20000
95 CHECK-NEXT:         MaxLifetimeAccessDensity: 20000