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
12 # We simulate the case when, for whatever reason, we see that a thread's stack
13 # is empty when we see an EXIT record. This can happen for example when an
14 # instrumented function does a 'fork()', 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
19 - { type: 0, func-id: 1, cpu: 1, thread: 1, kind: function-exit, tsc: 10000}
22 #CHECK: Error processing record: {{.*}}
23 #CHECK-NEXT: Thread ID: 1
24 #CHECK-NEXT: (empty stack)
25 #CHECK-NEXT: llvm-xray: Failed accounting function calls in file '{{.*}}'.
27 #KEEPGOING: Error processing record: {{.*}}
28 #KEEPGOING-NEXT: Thread ID: 1
29 #KEEPGOING-NEXT: (empty stack)