Reapply #147854 after fixes merged in #151398. Change memory access histogram storage from uint64_t to uint16_t to reduce profile size on disk. This change updates the raw profile format to v5. Also add a histogram test in compiler-rt since we didn't have one before. With this change the histogram memprof raw for the basic test reduces from 75KB -> 20KB.
23 lines
699 B
Plaintext
23 lines
699 B
Plaintext
REQUIRES: x86_64-linux
|
|
|
|
To update the inputs used below run Inputs/update_memprof_inputs.sh /path/to/updated/clang
|
|
RUN: llvm-profdata show --memory %p/Inputs/multi.memprofraw --profiled-binary %p/Inputs/multi.memprofexe -o - | FileCheck %s
|
|
|
|
We expect 2 MIB entries, 1 each for the malloc calls in the program.
|
|
|
|
CHECK: MemprofProfile:
|
|
CHECK-NEXT: Summary:
|
|
CHECK-NEXT: Version: 5
|
|
CHECK-NEXT: NumSegments: {{[0-9]+}}
|
|
CHECK-NEXT: NumMibInfo: 2
|
|
CHECK-NEXT: NumAllocFunctions: 1
|
|
CHECK-NEXT: NumStackOffsets: 2
|
|
|
|
CHECK: SymbolName: main
|
|
CHECK-NEXT: LineOffset: 1
|
|
CHECK-NEXT: Column: 21
|
|
|
|
CHECK: SymbolName: main
|
|
CHECK-NEXT: LineOffset: 5
|
|
CHECK-NEXT: Column: 15
|