llvm/llvm/test/tools/llvm-profdata/read-traces.proftext

# RUN: llvm-profdata merge -text %s -o %t.1.proftext
# RUN: llvm-profdata merge -binary %t.1.proftext -o %t.2.profdata
# RUN: llvm-profdata merge -text %t.2.profdata -o %t.3.proftext
# RUN: diff %t.1.proftext %t.3.proftext

# RUN: llvm-profdata show --temporal-profile-traces %t.1.proftext | FileCheck %s

# CHECK: Temporal Profile Traces (samples=3 seen=3):
# CHECK: Temporal Profile Trace 0 (weight=1 count=3):
# CHECK:   foo
# CHECK:   bar
# CHECK:   goo
# CHECK: Temporal Profile Trace 1 (weight=3 count=3):
# CHECK:   foo
# CHECK:   goo
# CHECK:   bar
# CHECK: Temporal Profile Trace 2 (weight=1 count=1):
# CHECK:   goo

# Header
:ir
:temporal_prof_traces
# Num Traces:
3
# Trace Stream Size:
3
# Weight
1
foo, bar, goo
# Weight
3
foo,goo,bar,
# Weight
1
goo

foo
# Func Hash:
0x1234
# Num Counters:
1
# Counter Values:
101

bar
0x5678
1
202

goo
0xabcd
1
303