Testing of XRay was occasionally disabled on 32-bit Arm targets (someone assumed that XRay was supported on 64-bit targets only). This patch should fix that problem. Also here the instruction&data cache incoherency problem is fixed, because it may be causing a test to fail.
This patch is one of a series: see also
Details
- Reviewers
dberris rengolin - Commits
- rG11077cf7d9ba: Merging r292517: --------------------------------------------------------------…
rG9bce1e7553b4: [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests
rG1bcd53f0e7d7: [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests
rCRT292517: [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests
rCRT292211: [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests
rL293296: Merging r292517:
rL292517: [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests
rL292211: [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests
Diff Detail
Event Timeline
Yes, that was me assuming that XRay wouldn't be supported in 32-bit systems. But I'm happy to be proven wrong there. :D
test/xray/lit.cfg | ||
---|---|---|
35 | I'm not too familiar with the arm triples, but don't we only support xray on arm7? Does that distinction matter? |
test/xray/lit.cfg | ||
---|---|---|
35 | AFAIK, build-bots are currently only armv7 . Furthermore, I understood that tests can only execute on architectures in ALL_XRAY_SUPPORTED_ARCH from llvm\projects\compiler-rt\cmake\config-ix.cmake , and this makes me question why 64-bitness is checked here again... |
test/xray/lit.cfg | ||
---|---|---|
35 | FWIW, all bots are ARMv7 and ARMv8. But that can break if someone is running the tests on, for example, a Raspberry Pi 1. |
Well, before we get this in, it would be good to make sure they actually pass all the tests on an ARMv7 system. I can run it locally on a system like the buildbots to be sure.
@rengolin , yes, please. This patch should be tested together with https://reviews.llvm.org/D28624 , because this patch only enables the tests and that one repairs XRay on Arm32.
test/xray/lit.cfg | ||
---|---|---|
35 | Oh, I meant "at least armv7". Armv8 should be ok. Armv6 is not fully supported by XRay (because movw and movt are written to the code at runtime). |
test/xray/lit.cfg | ||
---|---|---|
35 | Actually, I'm not sure about armv6, may be it's ok because movw and movt appear in armv6t2 . |
test/xray/lit.cfg | ||
---|---|---|
35 | Raspberry Pi 1 should be fine, then. |
I just tested on ARM and got these errors:
TestCases/Linux/patching-unpatching.cc
patching-unpatching.cc:28:17: error: expected string not found in input // CHECK-NEXT: patching status: 1 ^ <stdin>:3:1: note: scanning from here patching status: 0 ^
TestCases/Linux/argv0-log-file-name.cc
xray.log.file.name:2:11: error: expected string not found in input // CHECK: xray-log.argv0-log-file-name.cc.tmp.{{.*}} ^ <stdin>:1:1: note: scanning from here Output ^ <stdin>:2:1: note: possible intended match here xray.log.file.name ^
TestCases/Linux/fixedsize-logging.cc
fixedsize-logging.cc:17:12: error: expected string not found in input // CHECK: XRay: Log file in 'fixedsize-logging-{{.*}}' ^ <stdin>:1:1: note: scanning from here ==27375==XRay instrumentation map missing. Not initializing XRay. ^ <stdin>:1:38: note: possible intended match here ==27375==XRay instrumentation map missing. Not initializing XRay. ^
@rengolin , did you first apply patch https://reviews.llvm.org/D28624 before testing the current patch?
Especially the last quoted failed test seems to behave as if emission of XRay table is still broken.
Almost. After applying both patches, I still get:
TestCases/Linux/patching-unpatching.cc
patching-unpatching.cc:30:17: error: expected string not found in input // CHECK-NEXT: called: {{.*}}, type=0 ^ <stdin>:3:1: note: scanning from here always instrumented called ^ <stdin>:3:21: note: possible intended match here always instrumented called ^
Likely it is the same problem with ARM instruction&data cache incoherency we've seen on AArch64. Let me replicate that fix here too...
Added detection of -mthumb test compiler option, so to mark tests as unsupported on Thumb because XRay doesn't yet support Thumb CPU mode on Arm32.
I'm not too familiar with the arm triples, but don't we only support xray on arm7? Does that distinction matter?