llvm-project/compiler-rt/test/profile/instrprof-merge-error.c
Zequan Wu f52f8e817e [Profile] Allow online merging with debug info correlation.
When using debug info correlation, value profiling needs to be switched off.
So, we are only merging counter sections. In that case the existance of data
section is just used to provide an extra check in case of corrupted profile.

This patch performs counter merging by iterating the counter section by counter
size and add them together.

Reviewed By: ellis, MaskRay

Differential Revision: https://reviews.llvm.org/D157632
2023-08-28 16:35:41 -04:00

10 lines
408 B
C

// RUN: rm -rf %t; mkdir %t
// RUN: %clang_pgogen -o %t/timeprof -mllvm -pgo-temporal-instrumentation %s
// RUN: env LLVM_PROFILE_FILE=%t/timeprof_%m.profdata %run %t/timeprof 2>&1 | count 0
// RUN: env LLVM_PROFILE_FILE=%t/timeprof_%m.profdata %run %t/timeprof 2>&1 | FileCheck %s --check-prefix=TIMEPROF
// TIMEPROF: Temporal profiles do not support profile merging at runtime.
int main() { return 0; }