xref: /llvm-project/llvm/test/tools/llvm-xray/X86/account-exit-mismatch-non-empty-stack-error.yaml (revision 6d3d952f11d350f6ad2cd6199681af158f4bd397)
1#RUN: not llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -d 2>&1 | FileCheck %s
2#RUN: llvm-xray account %s -k -o - -m %S/Inputs/simple-instrmap.yaml -d 2>&1 | FileCheck %s --check-prefix=KEEPGOING
3
4---
5header:
6  version: 1
7  type: 0
8  constant-tsc: true
9  nonstop-tsc: true
10  cycle-frequency: 0
11records:
12# An exit record doesn't match an entry record on a non empty stack with sibling call deduction.
13# This can happen for example when an instrumented function does a 'fork()',
14# where the child process will not see
15# the entry record but see the exit record. This is completely valid data,
16# which should be handled with grace (i.e. we treat it as an error, but since
17# the llvm-xray account tool has an option to keep going, gives the user a
18# chance to retry).
19  - { type: 0, func-id: 1, cpu: 1, thread: 1, kind: function-enter, tsc: 10000 }
20  - { type: 0, func-id: 4, cpu: 1, thread: 1, kind: function-exit,  tsc: 10001 }
21  - { type: 0, func-id: 1, cpu: 1, thread: 1, kind: function-exit,  tsc: 10002 }
22...
23
24#CHECK:      Error processing record: {{.*}}
25#CHECK-NEXT: Thread ID: 1
26#CHECK-NEXT:   #1 @(1)
27#CHECK-NEXT: llvm-xray: Failed accounting function calls in file '{{.*}}'.
28
29#KEEPGOING:      Error processing record: {{.*}}
30#KEEPGOING-NEXT: Thread ID: 1
31#KEEPGOING-NEXT:   #1 @(1)
32