diff options
Diffstat (limited to 'test/tools/llvm-xray/X86')
-rw-r--r-- | test/tools/llvm-xray/X86/Inputs/fdr-log-version-1.xray | bin | 0 -> 232 bytes | |||
-rw-r--r-- | test/tools/llvm-xray/X86/Inputs/simple-instrmap.yaml | 12 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/account-deduce-tail-call.yaml | 2 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/account-keep-going.yaml | 2 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/account-simple-case.yaml | 2 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/account-simple-sorting.yaml | 18 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt | 24 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt | 2 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/graph-color-simple-case.yaml | 75 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/graph-deduce-tail-call.yaml | 75 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/graph-simple-case.yaml | 44 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/graph-zero-latency-calls.yaml | 20 | ||||
-rw-r--r-- | test/tools/llvm-xray/X86/no-subcommand-noassert.txt | 3 |
13 files changed, 266 insertions, 13 deletions
diff --git a/test/tools/llvm-xray/X86/Inputs/fdr-log-version-1.xray b/test/tools/llvm-xray/X86/Inputs/fdr-log-version-1.xray Binary files differnew file mode 100644 index 000000000000..628be9a5dc20 --- /dev/null +++ b/test/tools/llvm-xray/X86/Inputs/fdr-log-version-1.xray diff --git a/test/tools/llvm-xray/X86/Inputs/simple-instrmap.yaml b/test/tools/llvm-xray/X86/Inputs/simple-instrmap.yaml index e9c9f2e8d3c8..c1f6915646a0 100644 --- a/test/tools/llvm-xray/X86/Inputs/simple-instrmap.yaml +++ b/test/tools/llvm-xray/X86/Inputs/simple-instrmap.yaml @@ -7,4 +7,16 @@ - { id: 2, address: 0x3, function: 0x2, kind: function-exit, always-instrument: true} - { id: 3, address: 0x3, function: 0x3, kind: function-enter, always-instrument: true} - { id: 3, address: 0x4, function: 0x3, kind: function-exit, always-instrument: true} +- { id: 4, address: 0x4, function: 0x4, kind: function-enter, always-instrument: true} +- { id: 4, address: 0x5, function: 0x4, kind: function-exit, always-instrument: true} +- { id: 5, address: 0x5, function: 0x5, kind: function-enter, always-instrument: true} +- { id: 5, address: 0x6, function: 0x5, kind: function-exit, always-instrument: true} +- { id: 6, address: 0x6, function: 0x6, kind: function-enter, always-instrument: true} +- { id: 6, address: 0x7, function: 0x6, kind: function-exit, always-instrument: true} +- { id: 7, address: 0x7, function: 0x7, kind: function-enter, always-instrument: true} +- { id: 7, address: 0x8, function: 0x7, kind: function-exit, always-instrument: true} +- { id: 8, address: 0x8, function: 0x8, kind: function-enter, always-instrument: true} +- { id: 8, address: 0x9, function: 0x8, kind: function-exit, always-instrument: true} +- { id: 9, address: 0x9, function: 0x9, kind: function-enter, always-instrument: true} +- { id: 9, address: 0xA, function: 0x9, kind: function-exit, always-instrument: true} ... diff --git a/test/tools/llvm-xray/X86/account-deduce-tail-call.yaml b/test/tools/llvm-xray/X86/account-deduce-tail-call.yaml index 6e926974141f..e8b46cbf1766 100644 --- a/test/tools/llvm-xray/X86/account-deduce-tail-call.yaml +++ b/test/tools/llvm-xray/X86/account-deduce-tail-call.yaml @@ -1,4 +1,4 @@ -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -d | FileCheck %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -d | FileCheck %s --- header: version: 1 diff --git a/test/tools/llvm-xray/X86/account-keep-going.yaml b/test/tools/llvm-xray/X86/account-keep-going.yaml index 1b234c0d7e8e..76011ee8e6e5 100644 --- a/test/tools/llvm-xray/X86/account-keep-going.yaml +++ b/test/tools/llvm-xray/X86/account-keep-going.yaml @@ -1,4 +1,4 @@ -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -k | FileCheck %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -k | FileCheck %s --- header: version: 1 diff --git a/test/tools/llvm-xray/X86/account-simple-case.yaml b/test/tools/llvm-xray/X86/account-simple-case.yaml index f1f2bbdbccbd..c995a7a77dfe 100644 --- a/test/tools/llvm-xray/X86/account-simple-case.yaml +++ b/test/tools/llvm-xray/X86/account-simple-case.yaml @@ -1,4 +1,4 @@ -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml | FileCheck %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml | FileCheck %s --- header: version: 1 diff --git a/test/tools/llvm-xray/X86/account-simple-sorting.yaml b/test/tools/llvm-xray/X86/account-simple-sorting.yaml index 208809a091eb..e0f32696caf0 100644 --- a/test/tools/llvm-xray/X86/account-simple-sorting.yaml +++ b/test/tools/llvm-xray/X86/account-simple-sorting.yaml @@ -1,13 +1,13 @@ -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml | FileCheck --check-prefix DEFAULT %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s count | FileCheck --check-prefix COUNT-ASC %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s min | FileCheck --check-prefix MIN-ASC %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s max | FileCheck --check-prefix MAX-ASC %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s sum | FileCheck --check-prefix SUM-ASC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml | FileCheck --check-prefix DEFAULT %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s count | FileCheck --check-prefix COUNT-ASC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s min | FileCheck --check-prefix MIN-ASC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s max | FileCheck --check-prefix MAX-ASC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s sum | FileCheck --check-prefix SUM-ASC %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s count -r dsc | FileCheck --check-prefix COUNT-DSC %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s min -r dsc | FileCheck --check-prefix MIN-DSC %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s max -r dsc | FileCheck --check-prefix MAX-DSC %s -#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -t yaml -s sum -r dsc | FileCheck --check-prefix SUM-DSC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s count -r dsc | FileCheck --check-prefix COUNT-DSC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s min -r dsc | FileCheck --check-prefix MIN-DSC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s max -r dsc | FileCheck --check-prefix MAX-DSC %s +#RUN: llvm-xray account %s -o - -m %S/Inputs/simple-instrmap.yaml -s sum -r dsc | FileCheck --check-prefix SUM-DSC %s --- header: version: 1 diff --git a/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt b/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt new file mode 100644 index 000000000000..5a5852e72018 --- /dev/null +++ b/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt @@ -0,0 +1,24 @@ +; RUN: llvm-xray convert %S/Inputs/fdr-log-version-1.xray -f=yaml -o - | FileCheck %s + +; CHECK: --- +; CHECK-NEXT: header: +; CHECK-NEXT: version: 1 +; CHECK-NEXT: type: 1 +; CHECK-NEXT: constant-tsc: true +; CHECK-NEXT: nonstop-tsc: true +; CHECK-NEXT: cycle-frequency: 5678 +; CHECK-NEXT: records: +; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407340 } +; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 5, thread: 5, kind: function-exit, tsc: 7238225556407346 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407347 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407387 } +; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 5, thread: 5, kind: function-exit, tsc: 7238225556407437 } +; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 5, thread: 5, kind: function-exit, tsc: 7238225556407467 } +; CHECK-NEXT: - { type: 0, func-id: 4, function: '4', cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407492 } +; CHECK-NEXT: - { type: 0, func-id: 5, function: '5', cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407517 } +; CHECK-NEXT: - { type: 0, func-id: 5, function: '5', cpu: 5, thread: 5, kind: function-exit, tsc: 7238225556407542 } +; CHECK-NEXT: - { type: 0, func-id: 268435455, function: '268435455', cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407552 } +; CHECK-NEXT: - { type: 0, func-id: 268435455, function: '268435455', cpu: 5, thread: 5, kind: function-exit, tsc: 7238225556407562 } +; CHECK-NEXT: - { type: 0, func-id: 6, function: '6', cpu: 6, thread: 5, kind: function-enter, tsc: 7238225556407682 } +; CHECK-NEXT: - { type: 0, func-id: 6, function: '6', cpu: 6, thread: 5, kind: function-exit, tsc: 7238225556407755 } +; CHECK-NEXT: ... diff --git a/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt b/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt index c2b611492470..6837072a1fc5 100644 --- a/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt +++ b/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt @@ -1,4 +1,4 @@ -; RUN: llvm-xray convert -m %S/Inputs/simple-xray-instrmap.yaml -t yaml %S/Inputs/naive-log-simple.xray -f=yaml -o - | FileCheck %s +; RUN: llvm-xray convert -m %S/Inputs/simple-xray-instrmap.yaml %S/Inputs/naive-log-simple.xray -f=yaml -o - | FileCheck %s ; CHECK: --- ; CHECK-NEXT: header: diff --git a/test/tools/llvm-xray/X86/graph-color-simple-case.yaml b/test/tools/llvm-xray/X86/graph-color-simple-case.yaml new file mode 100644 index 000000000000..3950c8c99962 --- /dev/null +++ b/test/tools/llvm-xray/X86/graph-color-simple-case.yaml @@ -0,0 +1,75 @@ +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e sum -c sum \ +#RUN: | FileCheck %s -check-prefix=EDGE +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -v sum -b sum \ +#RUN: | FileCheck %s -check-prefix=VERTEX +--- +header: + version: 1 + type: 0 + constant-tsc: true + nonstop-tsc: true + cycle-frequency: 1 +records: + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10000 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10010 } + - { type: 0, func-id: 2, cpu: 1, thread: 111, kind: function-enter, tsc: 10100 } + - { type: 0, func-id: 2, cpu: 1, thread: 111, kind: function-exit, tsc: 10120 } + - { type: 0, func-id: 3, cpu: 1, thread: 111, kind: function-enter, tsc: 10200 } + - { type: 0, func-id: 3, cpu: 1, thread: 111, kind: function-exit, tsc: 10230 } + - { type: 0, func-id: 4, cpu: 1, thread: 111, kind: function-enter, tsc: 10300 } + - { type: 0, func-id: 4, cpu: 1, thread: 111, kind: function-exit, tsc: 10340 } + - { type: 0, func-id: 5, cpu: 1, thread: 111, kind: function-enter, tsc: 10400 } + - { type: 0, func-id: 5, cpu: 1, thread: 111, kind: function-exit, tsc: 10450 } + - { type: 0, func-id: 6, cpu: 1, thread: 111, kind: function-enter, tsc: 10500 } + - { type: 0, func-id: 6, cpu: 1, thread: 111, kind: function-exit, tsc: 10560 } + - { type: 0, func-id: 7, cpu: 1, thread: 111, kind: function-enter, tsc: 10600 } + - { type: 0, func-id: 7, cpu: 1, thread: 111, kind: function-exit, tsc: 10670 } + - { type: 0, func-id: 8, cpu: 1, thread: 111, kind: function-enter, tsc: 10700 } + - { type: 0, func-id: 8, cpu: 1, thread: 111, kind: function-exit, tsc: 10780 } + - { type: 0, func-id: 9, cpu: 1, thread: 111, kind: function-enter, tsc: 10800 } + - { type: 0, func-id: 9, cpu: 1, thread: 111, kind: function-exit, tsc: 10890 } +--- + + +#EDGE: digraph xray { +#EDGE-DAG: F0 -> F7 [label="7.{{[0-9]*}}e+01" color="#B00000"]; +#EDGE-DAG: F0 -> F2 [label="2.{{[0-9]*}}e+01" color="#FC9963"]; +#EDGE-DAG: F0 -> F9 [label="9.{{[0-9]*}}e+01" color="#7F0000"]; +#EDGE-DAG: F0 -> F4 [label="4.{{[0-9]*}}e+01" color="#E75339"]; +#EDGE-DAG: F0 -> F6 [label="6.{{[0-9]*}}e+01" color="#C4150D"]; +#EDGE-DAG: F0 -> F1 [label="1.{{[0-9]*}}e+01" color="#FDC48D"]; +#EDGE-DAG: F0 -> F8 [label="8.{{[0-9]*}}e+01" color="#970000"]; +#EDGE-DAG: F0 -> F3 [label="3.{{[0-9]*}}e+01" color="#F4744E"]; +#EDGE-DAG: F0 -> F5 [label="5.{{[0-9]*}}e+01" color="#D83220"]; +#EDGE-DAG: F7 [label="@(7)"]; +#EDGE-DAG: F2 [label="@(2)"]; +#EDGE-DAG: F9 [label="@(9)"]; +#EDGE-DAG: F4 [label="@(4)"]; +#EDGE-DAG: F6 [label="@(6)"]; +#EDGE-DAG: F1 [label="@(1)"]; +#EDGE-DAG: F8 [label="@(8)"]; +#EDGE-DAG: F3 [label="@(3)"]; +#EDGE-DAG: F5 [label="@(5)"]; +#EDGE-NEXT: } +# +#VERTEX: digraph xray { +#VERTEX-DAG: node [shape=record]; +#VERTEX-DAG: F0 -> F7 [label=""]; +#VERTEX-DAG: F0 -> F2 [label=""]; +#VERTEX-DAG: F0 -> F9 [label=""]; +#VERTEX-DAG: F0 -> F4 [label=""]; +#VERTEX-DAG: F0 -> F6 [label=""]; +#VERTEX-DAG: F0 -> F1 [label=""]; +#VERTEX-DAG: F0 -> F8 [label=""]; +#VERTEX-DAG: F0 -> F3 [label=""]; +#VERTEX-DAG: F0 -> F5 [label=""]; +#VERTEX-DAG: F7 [label="{@(7)|7.{{[0-9]*}}e+01}" color="#B00000"]; +#VERTEX-DAG: F2 [label="{@(2)|2.{{[0-9]*}}e+01}" color="#FC9963"]; +#VERTEX-DAG: F9 [label="{@(9)|9.{{[0-9]*}}e+01}" color="#7F0000"]; +#VERTEX-DAG: F4 [label="{@(4)|4.{{[0-9]*}}e+01}" color="#E75339"]; +#VERTEX-DAG: F6 [label="{@(6)|6.{{[0-9]*}}e+01}" color="#C4150D"]; +#VERTEX-DAG: F1 [label="{@(1)|1.{{[0-9]*}}e+01}" color="#FDC48D"]; +#VERTEX-DAG: F8 [label="{@(8)|8.{{[0-9]*}}e+01}" color="#970000"]; +#VERTEX-DAG: F3 [label="{@(3)|3.{{[0-9]*}}e+01}" color="#F4744E"]; +#VERTEX-DAG: F5 [label="{@(5)|5.{{[0-9]*}}e+01}" color="#D83220"]; +#VERTEX-NEXT: } diff --git a/test/tools/llvm-xray/X86/graph-deduce-tail-call.yaml b/test/tools/llvm-xray/X86/graph-deduce-tail-call.yaml new file mode 100644 index 000000000000..6f756bf018f9 --- /dev/null +++ b/test/tools/llvm-xray/X86/graph-deduce-tail-call.yaml @@ -0,0 +1,75 @@ +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d \ +#RUN: | FileCheck %s -check-prefix=EMPTY +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d -e count \ +#RUN: | FileCheck %s -check-prefix=COUNT +# +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d -e min \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d -e med \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d -e 90p \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d -e 99p \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d -e max \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -d -e sum \ +#RUN: | FileCheck %s -check-prefix=TIME +# +--- +header: + version: 1 + type: 0 + constant-tsc: true + nonstop-tsc: true + cycle-frequency: 0 +records: +# Here we reconstruct the following call trace: +# +# f1() +# f2() +# f3() +# +# But we find that we're missing an exit record for f2() because it's +# tail-called f3(). We make sure that if we see a trace like this that we can +# deduce tail calls, and account the time (potentially wrongly) to f2() when +# f1() exits. That is because we don't go back to f3()'s entry record to +# properly do the math on the timing of f2(). +# +# Note that by default, tail/sibling call deduction is disabled, and is enabled +# with a flag "-d" or "-deduce-sibling-calls". +# + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10000 } + - { type: 0, func-id: 2, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 } + - { type: 0, func-id: 3, cpu: 1, thread: 111, kind: function-enter, tsc: 10002 } + - { type: 0, func-id: 3, cpu: 1, thread: 111, kind: function-exit, tsc: 10003 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10004 } +... + +#EMPTY: digraph xray { +#EMPTY-DAG: F0 -> F1 [label=""]; +#EMPTY-DAG: F1 -> F2 [label=""]; +#EMPTY-DAG: F2 -> F3 [label=""]; +#EMPTY-DAG: F1 [label="@(1)"]; +#EMPTY-DAG: F2 [label="@(2)"]; +#EMPTY-DAG: F3 [label="@(3)"]; +#EMPTY-NEXT: } + +#COUNT: digraph xray { +#COUNT-DAG: F0 -> F1 [label="1"]; +#COUNT-DAG: F1 -> F2 [label="1"]; +#COUNT-DAG: F2 -> F3 [label="1"]; +#COUNT-DAG: F1 [label="@(1)"]; +#COUNT-DAG: F2 [label="@(2)"]; +#COUNT-DAG: F3 [label="@(3)"]; +#COUNT-NEXT: } + + +#TIME: digraph xray { +#TIME-DAG: F0 -> F1 [label="4.{{.*}}"]; +#TIME-DAG: F1 -> F2 [label="3.{{.*}}"]; +#TIME-DAG: F2 -> F3 [label="1.{{.*}}"]; +#TIME-DAG: F1 [label="@(1)"]; +#TIME-DAG: F2 [label="@(2)"]; +#TIME-DAG: F3 [label="@(3)"]; +#TIME-NEXT: } diff --git a/test/tools/llvm-xray/X86/graph-simple-case.yaml b/test/tools/llvm-xray/X86/graph-simple-case.yaml new file mode 100644 index 000000000000..b0d6dcf2fb4c --- /dev/null +++ b/test/tools/llvm-xray/X86/graph-simple-case.yaml @@ -0,0 +1,44 @@ +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml \ +#RUN: | FileCheck %s -check-prefix=EMPTY +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e count \ +#RUN: | FileCheck %s -check-prefix=COUNT +# +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e min \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e med \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e 90p \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e 99p \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e max \ +#RUN: | FileCheck %s -check-prefix=TIME +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml -e sum \ +#RUN: | FileCheck %s -check-prefix=TIME +--- +header: + version: 1 + type: 0 + constant-tsc: true + nonstop-tsc: true + cycle-frequency: 2601000000 +records: + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10100 } +... + + +#EMPTY: digraph xray { +#EMPTY-NEXT: F0 -> F1 [label=""]; +#EMPTY-NEXT: F1 [label="@(1)"]; +#EMPTY-NEXT: } + +#COUNT: digraph xray { +#COUNT-NEXT: F0 -> F1 [label="1"]; +#COUNT-NEXT: F1 [label="@(1)"]; +#COUNT-NEXT: } + +#TIME: digraph xray { +#TIME-NEXT: F0 -> F1 [label="3.8{{.*}}e-08"]; +#TIME-NEXT: F1 [label="@(1)"]; +#TIME-NEXT: } diff --git a/test/tools/llvm-xray/X86/graph-zero-latency-calls.yaml b/test/tools/llvm-xray/X86/graph-zero-latency-calls.yaml new file mode 100644 index 000000000000..602f209072af --- /dev/null +++ b/test/tools/llvm-xray/X86/graph-zero-latency-calls.yaml @@ -0,0 +1,20 @@ +#RUN: llvm-xray graph %s -o - -m %S/Inputs/simple-instrmap.yaml | FileCheck %s + +--- +header: + version: 1 + type: 0 + constant-tsc: true + nonstop-tsc: true + cycle-frequency: 2601000000 +records: + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-enter, tsc: 10001 } + - { type: 0, func-id: 2, cpu: 1, thread: 111, kind: function-enter, tsc: 10002 } + - { type: 0, func-id: 2, cpu: 1, thread: 111, kind: function-exit, tsc: 10002 } + - { type: 0, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10100 } +... + +#CHECK: digraph xray { +#CHECK-DAG: F0 -> F1 [{{.*}}]; +#CHECK-DAG: F1 -> F2 [{{.*}}]; +#CHECK-DAG: } diff --git a/test/tools/llvm-xray/X86/no-subcommand-noassert.txt b/test/tools/llvm-xray/X86/no-subcommand-noassert.txt new file mode 100644 index 000000000000..3de328d73a43 --- /dev/null +++ b/test/tools/llvm-xray/X86/no-subcommand-noassert.txt @@ -0,0 +1,3 @@ +; RUN: llvm-xray | FileCheck %s + +; CHECK: OVERVIEW: XRay Tools |