
When merging profiles with multiple threads, the `mergeWriterContexts()` function is used to merge profile data between writers. This must be in sync with `loadInput()` which merges profiles to a single writer. This diff merges the profile kind correctly in `mergeWriterContexts()` to fix a subtle bug. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D139755
18 lines
785 B
Plaintext
18 lines
785 B
Plaintext
# Tests for merge of empty profile files.
|
|
|
|
RUN: touch %t_empty.proftext
|
|
RUN: llvm-profdata merge -text -o - %t_empty.proftext %p/Inputs/clang_profile.proftext | FileCheck %s -check-prefix=CLANG_PROF_TEXT
|
|
RUN: llvm-profdata merge -text -o - %t_empty.proftext %p/Inputs/clang_profile.proftext --num-threads=2 | FileCheck %s -check-prefix=CLANG_PROF_TEXT
|
|
CLANG_PROF_TEXT: main
|
|
CLANG_PROF_TEXT: 0
|
|
CLANG_PROF_TEXT: 1
|
|
CLANG_PROF_TEXT: 1
|
|
|
|
RUN: llvm-profdata merge -text -o - %t_empty.proftext %p/Inputs/IR_profile.proftext | FileCheck %s -check-prefix=IR_PROF_TEXT
|
|
RUN: llvm-profdata merge -text -o - %t_empty.proftext %p/Inputs/IR_profile.proftext --num-threads=2 | FileCheck %s -check-prefix=IR_PROF_TEXT
|
|
IR_PROF_TEXT: :ir
|
|
IR_PROF_TEXT: main
|
|
IR_PROF_TEXT: 0
|
|
IR_PROF_TEXT: 1
|
|
IR_PROF_TEXT: 1
|