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.
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
18 CHECK-NEXT: BuildId: {{[[:xdigit:]]+}}
19 CHECK-NEXT: Start: 0x{{[[:xdigit:]]+}}
20 CHECK-NEXT: End: 0x{{[[:xdigit:]]+}}
21 CHECK-NEXT: Offset: 0x{{[[:xdigit:]]+}}
26 CHECK-NEXT: FunctionGUID: {{[0-9]+}}
27 CHECK-NEXT: AllocSites:
29 CHECK-NEXT: Callstack:
31 CHECK-NEXT: Function: {{[0-9]+}}
32 CHECK-NEXT: SymbolName: main
33 CHECK-NEXT: LineOffset: 1
34 CHECK-NEXT: Column: 21
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
63 CHECK-NEXT: Callstack:
65 CHECK-NEXT: Function: {{[0-9]+}}
66 CHECK-NEXT: SymbolName: main
67 CHECK-NEXT: LineOffset: 4
68 CHECK-NEXT: Column: 15
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