summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-xray
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-07-13 05:38:22 +0000
committerDean Michael Berris <dberris@google.com>2018-07-13 05:38:22 +0000
commit10141261e1c18c07772ed3c96eecbe2e467d161c (patch)
tree9980444d3f6b2cc14ecbfd23c7c91b646a2843b1 /llvm/test/tools/llvm-xray
parent2ab325ba23833b35ba137257378faf2cde7c13d0 (diff)
downloadbcm5719-llvm-10141261e1c18c07772ed3c96eecbe2e467d161c.tar.gz
bcm5719-llvm-10141261e1c18c07772ed3c96eecbe2e467d161c.zip
[XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata record entry in FDR mode
Summary: llvm-xray changes: - account-mode - process-id {...} shows after thread-id - convert-mode - process {...} shows after thread - parses FDR and basic mode pid entries - Checks version number for FDR log parsing. Basic logging changes: - Update header version from 2 -> 3 FDR logging changes: - Update header version from 2 -> 3 - in writeBufferPreamble, there is an additional PID Metadata record (after thread id record and tsc record) Test cases changes: - fdr-mode.cc, fdr-single-thread.cc, fdr-thread-order.cc modified to catch process id output in the log. Reviewers: dberris Reviewed By: dberris Subscribers: hiraditya, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49153 llvm-svn: 336974
Diffstat (limited to 'llvm/test/tools/llvm-xray')
-rw-r--r--llvm/test/tools/llvm-xray/X86/Inputs/basic-log-arg1-version-3.xraybin0 -> 256 bytes
-rw-r--r--llvm/test/tools/llvm-xray/X86/Inputs/basic-log-version-3.xraybin0 -> 288 bytes
-rw-r--r--llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-arg1-version-3.xraybin0 -> 224 bytes
-rw-r--r--llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-version-3.xraybin0 -> 192 bytes
-rw-r--r--llvm/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt17
-rw-r--r--llvm/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt19
-rw-r--r--llvm/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt17
-rw-r--r--llvm/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt17
8 files changed, 70 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-xray/X86/Inputs/basic-log-arg1-version-3.xray b/llvm/test/tools/llvm-xray/X86/Inputs/basic-log-arg1-version-3.xray
new file mode 100644
index 00000000000..7c537033964
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/Inputs/basic-log-arg1-version-3.xray
Binary files differ
diff --git a/llvm/test/tools/llvm-xray/X86/Inputs/basic-log-version-3.xray b/llvm/test/tools/llvm-xray/X86/Inputs/basic-log-version-3.xray
new file mode 100644
index 00000000000..2a603903b3d
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/Inputs/basic-log-version-3.xray
Binary files differ
diff --git a/llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-arg1-version-3.xray b/llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-arg1-version-3.xray
new file mode 100644
index 00000000000..6aee7aacad3
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-arg1-version-3.xray
Binary files differ
diff --git a/llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-version-3.xray b/llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-version-3.xray
new file mode 100644
index 00000000000..0ce0bc6d3d3
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-version-3.xray
Binary files differ
diff --git a/llvm/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt b/llvm/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt
new file mode 100644
index 00000000000..65232b79ba4
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt
@@ -0,0 +1,17 @@
+; RUN: llvm-xray convert %S/Inputs/basic-log-arg1-version-3.xray -f=yaml -o - | FileCheck %s
+
+; CHECK: ---
+; CHECK-NEXT: header:
+; CHECK-NEXT: version: 3
+; CHECK-NEXT: type: 0
+; CHECK-NEXT: constant-tsc: true
+; CHECK-NEXT: nonstop-tsc: true
+; CHECK-NEXT: cycle-frequency: 3900000000
+; CHECK-NEXT: records:
+; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 0, thread: 2590, process: 2590, kind: function-enter, tsc: 2033303630902004 }
+; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 0, thread: 2590, process: 2590, kind: function-exit, tsc: 2033403115246844 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 0, thread: 2590, process: 2590, kind: function-enter, tsc: 2033490200702516 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 0, thread: 2590, process: 2590, kind: function-exit, tsc: 2033504122687120 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', args: [ 67 ], cpu: 0, thread: 2590, process: 2590, kind: function-enter-arg, tsc: 2033505343905936 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 0, thread: 2590, process: 2590, kind: function-exit, tsc: 2033505343936752 }
+; CHECK-NEXT: ...
diff --git a/llvm/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt b/llvm/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt
new file mode 100644
index 00000000000..21a3b7e4a0f
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt
@@ -0,0 +1,19 @@
+; RUN: llvm-xray convert %S/Inputs/basic-log-version-3.xray -f=yaml -o - | FileCheck %s
+
+; CHECK: ---
+; CHECK-NEXT: header:
+; CHECK-NEXT: version: 3
+; CHECK-NEXT: type: 0
+; CHECK-NEXT: constant-tsc: true
+; CHECK-NEXT: nonstop-tsc: true
+; CHECK-NEXT: cycle-frequency: 3900000000
+; CHECK-NEXT: records:
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 7, thread: 25518, process: 25518, kind: function-enter, tsc: 2070767347414784 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 7, thread: 25518, process: 25518, kind: function-exit, tsc: 2070767347496472 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 7, thread: 25518, process: 25518, kind: function-enter, tsc: 2070768324320264 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 7, thread: 25518, process: 25518, kind: function-exit, tsc: 2070768324344100 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 7, thread: 25518, process: 25518, kind: function-enter, tsc: 2070768921602152 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 7, thread: 25518, process: 25518, kind: function-exit, tsc: 2070768921625968 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 7, thread: 25518, process: 25518, kind: function-enter, tsc: 2070769627174140 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 7, thread: 25518, process: 25518, kind: function-exit, tsc: 2070769627197624 }
+; CHECK-NEXT: ...
diff --git a/llvm/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt b/llvm/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt
new file mode 100644
index 00000000000..a3a3ed6d22b
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt
@@ -0,0 +1,17 @@
+; RUN: llvm-xray convert %S/Inputs/fdr-log-arg1-version-3.xray -f=yaml -o - | FileCheck %s
+
+; CHECK: ---
+; CHECK-NEXT: header:
+; CHECK-NEXT: version: 3
+; CHECK-NEXT: type: 1
+; CHECK-NEXT: constant-tsc: true
+; CHECK-NEXT: nonstop-tsc: true
+; CHECK-NEXT: cycle-frequency: 3900000000
+; CHECK-NEXT: records:
+; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 6, thread: 2631, process: 2631, kind: function-enter, tsc: 2034042117104344 }
+; CHECK-NEXT: - { type: 0, func-id: 3, function: '3', cpu: 6, thread: 2631, process: 2631, kind: function-exit, tsc: 2034042117199088 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 6, thread: 2631, process: 2631, kind: function-enter, tsc: 2034043145686378 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 6, thread: 2631, process: 2631, kind: function-exit, tsc: 2034043145762200 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', args: [ 67 ], cpu: 6, thread: 2631, process: 2631, kind: function-enter-arg, tsc: 2034049739853430 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 6, thread: 2631, process: 2631, kind: function-exit, tsc: 2034049739878154 }
+; CHECK-NEXT: ...
diff --git a/llvm/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt b/llvm/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt
new file mode 100644
index 00000000000..46287b2572c
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt
@@ -0,0 +1,17 @@
+; RUN: llvm-xray convert %S/Inputs/fdr-log-version-3.xray -f=yaml -o - | FileCheck %s
+
+; CHECK: ---
+; CHECK-NEXT: header:
+; CHECK-NEXT: version: 3
+; CHECK-NEXT: type: 1
+; CHECK-NEXT: constant-tsc: true
+; CHECK-NEXT: nonstop-tsc: true
+; CHECK-NEXT: cycle-frequency: 3900000000
+; CHECK-NEXT: records:
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 4, thread: 25190, process: 25190, kind: function-enter, tsc: 2069294857657498 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 4, thread: 25190, process: 25190, kind: function-exit, tsc: 2069294857707502 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 4, thread: 25190, process: 25190, kind: function-enter, tsc: 2069295590705912 }
+; CHECK-NEXT: - { type: 0, func-id: 2, function: '2', cpu: 4, thread: 25190, process: 25190, kind: function-exit, tsc: 2069295590734308 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 4, thread: 25190, process: 25190, kind: function-enter, tsc: 2069296377598128 }
+; CHECK-NEXT: - { type: 0, func-id: 1, function: '1', cpu: 4, thread: 25190, process: 25190, kind: function-exit, tsc: 2069296377627032 }
+; CHECK-NEXT: ...
OpenPOWER on IntegriCloud