blob: d02d070a1f62caf4f6a9e90c3aa4152363a3eaad [file] [log] [blame]
Dean Michael Berris415f15c2017-08-31 01:07:24 +00001#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# 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
18# chance to retry).
19 - { type: 0, func-id: 1, cpu: 1, thread: 1, kind: function-exit, tsc: 10000}
20...
21
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 '{{.*}}'.
26
27#KEEPGOING: Error processing record: {{.*}}
28#KEEPGOING-NEXT: Thread ID: 1
29#KEEPGOING-NEXT: (empty stack)