37 lines · yaml
1#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -d | FileCheck %s2---3header:4 version: 15 type: 06 constant-tsc: true7 nonstop-tsc: true8 cycle-frequency: 09records:10# Here we reconstruct the following call trace:11#12# f1()13# f2()14# f3()15#16# But we find that we're missing an exit record for f2() because it's17# tail-called f3(). We make sure that if we see a trace like this that we can18# deduce tail calls, and account the time (potentially wrongly) to f2() when19# f1() exits. That is because we don't go back to f3()'s entry record to20# properly do the math on the timing of f2().21#22# Note that by default, tail/sibling call deduction is disabled, and is enabled23# with a flag "-d" or "-deduce-sibling-calls".24#25 - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10000 }26 - { type: 0, func-id: 2, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 }27 - { type: 0, func-id: 3, cpu: 1, thread: 111, kind: function-enter, tsc: 10002 }28 - { type: 0, func-id: 3, cpu: 1, thread: 111, kind: function-exit, tsc: 10003 }29 - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10004 }30...31 32#CHECK: Functions with latencies: 333#CHECK-NEXT: funcid count [ min, med, 90p, 99p, max] sum function34#CHECK-NEXT: 1 1 [ 4.{{.*}}, 4.{{.*}}, 4.{{.*}}, 4.{{.*}}, 4.{{.*}}] {{.*}} {{.*}}35#CHECK-NEXT: 2 1 [ 3.{{.*}}, 3.{{.*}}, 3.{{.*}}, 3.{{.*}}, 3.{{.*}}] {{.*}} {{.*}}36#CHECK-NEXT: 3 1 [ 1.{{.*}}, 1.{{.*}}, 1.{{.*}}, 1.{{.*}}, 1.{{.*}}] {{.*}} {{.*}}37