aboutsummaryrefslogtreecommitdiff
path: root/test/tools
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2017-10-05 05:18:17 +0000
committerDean Michael Berris <dberris@google.com>2017-10-05 05:18:17 +0000
commit728dd9a060fb5c665e39616a699b4e5a041e2bf0 (patch)
treecbde69e2b97f8c5d356b480d05787cffaa8a6f05 /test/tools
parentabd8a85848ed44a280b0272e36e6d433100925b7 (diff)
downloadllvm-728dd9a060fb5c665e39616a699b4e5a041e2bf0.tar.gz
[XRay][tools] Support arg1 logging entries in the basic logging mode
Summary: The arg1 logging handler changed in compiler-rt to start writing a different type for entries encountered when logging the first argument of XRay-instrumented functions. This change allows the trace loader to support reading these record types as well as prepare for when the basic (naive) mode implementation starts writing down the argument payloads. Without this change, binaries with arg1 logging support enabled start writing unreadable logs for any of the XRay tracing tools. Reviewers: pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38550 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools')
-rw-r--r--test/tools/llvm-xray/X86/Inputs/naive-with-arg1-entries.xraybin0 -> 192 bytes
-rw-r--r--test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt15
2 files changed, 15 insertions, 0 deletions
diff --git a/test/tools/llvm-xray/X86/Inputs/naive-with-arg1-entries.xray b/test/tools/llvm-xray/X86/Inputs/naive-with-arg1-entries.xray
new file mode 100644
index 00000000000..02606590299
--- /dev/null
+++ b/test/tools/llvm-xray/X86/Inputs/naive-with-arg1-entries.xray
Binary files differ
diff --git a/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt b/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt
new file mode 100644
index 00000000000..88a9dc2e58c
--- /dev/null
+++ b/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt
@@ -0,0 +1,15 @@
+; RUN: llvm-xray convert %S/Inputs/naive-with-arg1-entries.xray -f=yaml -o - | FileCheck %s
+
+; CHECK: ---
+; CHECK-NEXT: header:
+; CHECK-NEXT: version: 2
+; CHECK-NEXT: type: 0
+; CHECK-NEXT: constant-tsc: true
+; CHECK-NEXT: nonstop-tsc: true
+; CHECK-NEXT: cycle-frequency: 3500000000
+; CHECK-NEXT: records:
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 17, thread: 8715, kind: function-enter, tsc: 22555670288232728 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 17, thread: 8715, kind: function-exit, tsc: 22555670288334784 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', args: [ 1 ], cpu: 17, thread: 8715, kind: function-enter-arg, tsc: 22555670288335768 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 17, thread: 8715, kind: function-exit, tsc: 22555670288365224 }
+; CHECK-NEXT: ...