[llvm] 95e6f5c - [llvm-xray][test] Combine two AArch64 tests

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 10:54:30 PDT 2020


Author: Fangrui Song
Date: 2020-04-13T10:54:21-07:00
New Revision: 95e6f5c655fa39c26e4dc8d5ca65749af69cb484

URL: https://github.com/llvm/llvm-project/commit/95e6f5c655fa39c26e4dc8d5ca65749af69cb484
DIFF: https://github.com/llvm/llvm-project/commit/95e6f5c655fa39c26e4dc8d5ca65749af69cb484.diff

LOG: [llvm-xray][test] Combine two AArch64 tests

Rename extract-instrmap-aarch64.test to extract-instrmap.test because
the path component `AArch64` conveys the target name clearly.

Additionally, adopt a convention we start to use in LLVM binary
utilities: prepend `#` to CHECK/RUN lines and `##` to comment lines even
if the file contains no code. The notation makes CHECK/RUN/comments
stand out.

Reviewed By: dberris

Differential Revision: https://reviews.llvm.org/D77883

Added: 
    llvm/test/tools/llvm-xray/AArch64/extract-instrmap.test

Modified: 
    

Removed: 
    llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64-mangled.test
    llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64.test


################################################################################
diff  --git a/llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64-mangled.test b/llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64-mangled.test
deleted file mode 100644
index 5c8755164a5b..000000000000
--- a/llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64-mangled.test
+++ /dev/null
@@ -1,14 +0,0 @@
-This test makes sure we can extract the instrumentation map from an
-XRay-instrumented PIE file.
-
-RUN: yaml2obj %S/Inputs/elf64-pic.yaml -o %t.so
-RUN: llvm-xray extract -s --no-demangle %t.so | FileCheck %s
-
-CHECK:      ---
-CHECK-NEXT: - { id: 1, address: 0x0000000000000420, function: 0x0000000000000420, kind: function-enter, always-instrument: true, function-name: _Z3foov }
-CHECK-NEXT: - { id: 1, address: 0x0000000000000440, function: 0x0000000000000420, kind: function-exit, always-instrument: true, function-name: _Z3foov }
-CHECK-NEXT: - { id: 2, address: 0x0000000000000464, function: 0x0000000000000464, kind: function-enter, always-instrument: true, function-name: _Z3barv }
-CHECK-NEXT: - { id: 2, address: 0x0000000000000484, function: 0x0000000000000464, kind: function-exit, always-instrument: true, function-name: _Z3barv }
-CHECK-NEXT: - { id: 3, address: 0x00000000000004A8, function: 0x00000000000004A8, kind: function-enter, always-instrument: true, function-name: _Z3jarv }
-CHECK-NEXT: - { id: 3, address: 0x00000000000004C8, function: 0x00000000000004A8, kind: function-exit, always-instrument: true, function-name: _Z3jarv }
-CHECK-NEXT: ...

diff  --git a/llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64.test b/llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64.test
deleted file mode 100644
index 8f39548c3f56..000000000000
--- a/llvm/test/tools/llvm-xray/AArch64/extract-instrmap-aarch64.test
+++ /dev/null
@@ -1,14 +0,0 @@
-This test makes sure we can extract the instrumentation map from an
-XRay-instrumented PIE file.
-
-RUN: yaml2obj %S/Inputs/elf64-pic.yaml -o %t.so
-RUN: llvm-xray extract %t.so -s | FileCheck %s
-
-CHECK:      ---
-CHECK-NEXT: - { id: 1, address: 0x0000000000000420, function: 0x0000000000000420, kind: function-enter, always-instrument: true, function-name: 'foo()' }
-CHECK-NEXT: - { id: 1, address: 0x0000000000000440, function: 0x0000000000000420, kind: function-exit, always-instrument: true, function-name: 'foo()' }
-CHECK-NEXT: - { id: 2, address: 0x0000000000000464, function: 0x0000000000000464, kind: function-enter, always-instrument: true, function-name: 'bar()' }
-CHECK-NEXT: - { id: 2, address: 0x0000000000000484, function: 0x0000000000000464, kind: function-exit, always-instrument: true, function-name: 'bar()' }
-CHECK-NEXT: - { id: 3, address: 0x00000000000004A8, function: 0x00000000000004A8, kind: function-enter, always-instrument: true, function-name: 'jar()' }
-CHECK-NEXT: - { id: 3, address: 0x00000000000004C8, function: 0x00000000000004A8, kind: function-exit, always-instrument: true, function-name: 'jar()' }
-CHECK-NEXT: ...

diff  --git a/llvm/test/tools/llvm-xray/AArch64/extract-instrmap.test b/llvm/test/tools/llvm-xray/AArch64/extract-instrmap.test
new file mode 100644
index 000000000000..3f796ae9d740
--- /dev/null
+++ b/llvm/test/tools/llvm-xray/AArch64/extract-instrmap.test
@@ -0,0 +1,25 @@
+## This test makes sure we can extract the instrumentation map from an
+## XRay-instrumented PIE file.
+
+# RUN: yaml2obj %S/Inputs/elf64-pic.yaml -o %t.so
+# RUN: llvm-xray extract %t.so -s | FileCheck %s
+
+# CHECK:      ---
+# CHECK-NEXT: - { id: 1, address: 0x0000000000000420, function: 0x0000000000000420, kind: function-enter, always-instrument: true, function-name: 'foo()' }
+# CHECK-NEXT: - { id: 1, address: 0x0000000000000440, function: 0x0000000000000420, kind: function-exit, always-instrument: true, function-name: 'foo()' }
+# CHECK-NEXT: - { id: 2, address: 0x0000000000000464, function: 0x0000000000000464, kind: function-enter, always-instrument: true, function-name: 'bar()' }
+# CHECK-NEXT: - { id: 2, address: 0x0000000000000484, function: 0x0000000000000464, kind: function-exit, always-instrument: true, function-name: 'bar()' }
+# CHECK-NEXT: - { id: 3, address: 0x00000000000004A8, function: 0x00000000000004A8, kind: function-enter, always-instrument: true, function-name: 'jar()' }
+# CHECK-NEXT: - { id: 3, address: 0x00000000000004C8, function: 0x00000000000004A8, kind: function-exit, always-instrument: true, function-name: 'jar()' }
+# CHECK-NEXT: ...
+
+# RUN: llvm-xray extract -s --no-demangle %t.so | FileCheck --check-prefix=MANGLED %s
+
+# MANGLED:      ---
+# MANGLED-NEXT: - { id: 1, address: 0x0000000000000420, function: 0x0000000000000420, kind: function-enter, always-instrument: true, function-name: _Z3foov }
+# MANGLED-NEXT: - { id: 1, address: 0x0000000000000440, function: 0x0000000000000420, kind: function-exit, always-instrument: true, function-name: _Z3foov }
+# MANGLED-NEXT: - { id: 2, address: 0x0000000000000464, function: 0x0000000000000464, kind: function-enter, always-instrument: true, function-name: _Z3barv }
+# MANGLED-NEXT: - { id: 2, address: 0x0000000000000484, function: 0x0000000000000464, kind: function-exit, always-instrument: true, function-name: _Z3barv }
+# MANGLED-NEXT: - { id: 3, address: 0x00000000000004A8, function: 0x00000000000004A8, kind: function-enter, always-instrument: true, function-name: _Z3jarv }
+# MANGLED-NEXT: - { id: 3, address: 0x00000000000004C8, function: 0x00000000000004A8, kind: function-exit, always-instrument: true, function-name: _Z3jarv }
+# MANGLED-NEXT: ...


        


More information about the llvm-commits mailing list