summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/xray/xray_arm.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/xray to .cppNico Weber2019-08-011-164/+0
| | | | | | Like r367463, but for xray. llvm-svn: 367546
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [XRay][compiler-rt] Add noop patch functions for unsupported arches.Keith Wyss2018-04-171-0/+6
| | | | | | | | | | | | | | Summary: Typed event patching is implemented for x86-64, but functions must be defined for other arches. Reviewers: dberris, pelikan Subscribers: nemanjai, javed.absar, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45749 llvm-svn: 330231
* [XRay][compiler-rt] Fix misspeling of XRaySledEntryDean Michael Berris2017-05-121-1/+1
| | | | | | Follow-up to D30630. llvm-svn: 302860
* [XRay][compiler-rt] Runtime changes to support custom event loggingDean Michael Berris2017-05-121-3/+9
| | | | | | | | | | | | | | | | | | | | Summary: This change implements support for the custom event logging sleds and intrinsics at runtime. For now it only supports handling the sleds in x86_64, with the implementations for other architectures stubbed out to do nothing. NOTE: Work in progress, uploaded for exposition/exploration purposes. Depends on D27503, D30018, and D33032. Reviewers: echristo, javed.absar, timshen Subscribers: mehdi_amini, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D30630 llvm-svn: 302857
* [XRay] [compiler-rt] Allow logging the first argument of a function call.Dean Michael Berris2017-03-061-2/+7
| | | | | | | | | | | | | | | | | | | Summary: Functions with the LOG_ARGS_ENTRY sled kind at their beginning will be handled in a way to (optionally) pass their first call argument to your logging handler. For practical and performance reasons, only the first argument is supported, and only up to 64 bits. Reviewers: javed.absar, dberris Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29703 llvm-svn: 297000
* [XRay] Refactor TSC related functions into a single header. NFC.Tim Shen2017-02-101-14/+0
| | | | | | | | | | | | | Summary: The implementation, however, is in different arch-specific files, unless it's emulated. Reviewers: dberris, pelikan, javed.absar Subscribers: aemerson, llvm-commits Differential Revision: https://reviews.llvm.org/D29796 llvm-svn: 294777
* [XRay][compiler-rt][NFC] Turn ProudCase functions to humbleCase functionsDean Michael Berris2017-02-071-4/+4
| | | | | | | | | | | | | | | Summary: As pointed out in casual reading of the XRay codebase, that we had some interesting named functions that didn't quite follow the LLVM coding conventions. Reviewers: chandlerc, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29625 llvm-svn: 294373
* [XRay] Probe for CPU features that XRay needsDean Michael Berris2017-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: In llvm.org/PR31756 it's pointed out that sometimes rdtscp isn't available. We fix it here by checking first whether it's availble before installing the logging handler. In future commits we can have alternative implementations, maybe working around some of the constraints on some systems. This change enables us to make that determination, but report an error instead when the features aren't available. Reviewers: sdardis, javed.absar, rSerge Subscribers: pelikan, llvm-commits Differential Revision: https://reviews.llvm.org/D29438 llvm-svn: 293870
* [XRay][Arm32] Reduce the portion of the stub and implement more staging for ↵Serge Rogatch2017-01-261-3/+1
| | | | | | | | | | | | | | | | | | | tail calls - in compiler-rt Summary: This patch provides more staging for tail calls in XRay Arm32 . When the logging part of XRay is ready for tail calls, its support in the core part of XRay Arm32 may be as easy as changing the number passed to the handler from 1 to 2. Coupled patch: - https://reviews.llvm.org/D28673 Reviewers: dberris, rengolin Reviewed By: dberris, rengolin Subscribers: llvm-commits, iid_iunknown, aemerson Differential Revision: https://reviews.llvm.org/D28674 llvm-svn: 293186
* [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing testsSerge Rogatch2017-01-191-1/+6
| | | | | | | | | | | | | | | | | Summary: 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 - https://reviews.llvm.org/D28624 Reviewers: dberris, rengolin Reviewed By: rengolin Subscribers: llvm-commits, aemerson, rengolin, dberris, iid_iunknown Differential Revision: https://reviews.llvm.org/D28623 llvm-svn: 292517
* Revert "[XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests"Renato Golin2017-01-181-6/+1
| | | | | | | | | This reverts commit r292211, as it broke the Thumb buldbot with: clang-5.0: error: the clang compiler does not support '-fxray-instrument on thumbv7-unknown-linux-gnueabihf' llvm-svn: 292356
* [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing testsSerge Rogatch2017-01-171-1/+6
| | | | | | | | | | | | | | | | | Summary: 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 - https://reviews.llvm.org/D28624 Reviewers: dberris, rengolin Reviewed By: rengolin Subscribers: llvm-commits, aemerson, rengolin, dberris, iid_iunknown Differential Revision: https://reviews.llvm.org/D28623 llvm-svn: 292211
* [XRay] [compiler-rt] Move machine-dependent code into machine-dependent filesDiana Picus2016-12-221-0/+14
| | | | | | | | | | Reapply r290077. Authors: pelikan Differential Revision: https://reviews.llvm.org/D27979 llvm-svn: 290330
* Revert "[XRay] [compiler-rt] Move machine-dependent code into ↵Diana Picus2016-12-191-14/+0
| | | | | | | | machine-dependent files." This reverts commit r290077, 78, 79 and 83. llvm-svn: 290101
* [XRay] [compiler-rt] Move machine-dependent code into machine-dependent files.Dean Michael Berris2016-12-191-0/+14
| | | | | | | | | | | | Summary: Include the necessary headers while there. Reviewers: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25360 llvm-svn: 290077
* [XRay][compiler-rt] Attempt to fix ARM buildbots after r287068Diana Picus2016-11-161-0/+1
| | | | | | | | | | | Include xray_defs.h in xray_arm.cc (seems to be the only one that doesn't include it). Buildbot errors: [...]/compiler-rt/lib/xray/xray_arm.cc:31:58: error: expected initializer before 'XRAY_NEVER_INSTRUMENT' inline static uint32_t getMovwMask(const uint32_t Value) XRAY_NEVER_INSTRUMENT { llvm-svn: 287089
* [XRay][compiler-rt] Disable XRay instrumentation of the XRay runtime.Dean Michael Berris2016-11-161-12/+16
| | | | | | | | | | | | | | | | | | | | | Summary: Adds a CMake check for whether the compiler used to build the XRay library supports XRay-instrumentation. If the compiler we're using does support the `-fxray-instrument` flag (i.e. recently-built Clang), we define the XRAY_NEVER_INSTRUMENT macro that then makes sure that the XRay runtime functions never get XRay-instrumented. This prevents potential weirdness involved with building the XRay library with a Clang that supports XRay-instrumentation, and is attempting to XRay-instrument the build of compiler-rt. Reviewers: majnemer, rSerge, echristo Subscribers: mehdi_amini, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D26597 llvm-svn: 287068
* [compiler-rt][XRay] Support tail call sledsDean Michael Berris2016-10-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change depends on D23986 which adds tail call-specific sleds. For now we treat them first as normal exits, and in the future leave room for implementing this as a different kind of log entry. The reason for deferring the change is so that we can keep the naive logging implementation more accurate without additional complexity for reading the log. The accuracy is gained in effectively interpreting call stacks like: A() B() C() Which when tail-call merged will end up not having any exit entries for A() nor B(), but effectively in turn can be reasoned about as: A() B() C() Although we lose the fact that A() had called B() then had called C() with the naive approach, a later iteration that adds the explicit tail call entries would be a change in the log format and thus necessitate a version change for the header. We can do this later to have a chance at releasing some tools (in D21987) that are able to handle the naive log format, then support higher version numbers of the log format too. Reviewers: echristo, kcc, rSerge, majnemer Subscribers: mehdi_amini, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D23988 llvm-svn: 284178
* [compiler-rt][XRay][NFC] clang-format XRay sourcesDean Michael Berris2016-10-061-11/+10
| | | | llvm-svn: 283421
* [XRay] ARM 32-bit no-Thumb support in compiler-rtDean Michael Berris2016-09-201-0/+131
| | | | | | | | | | | | This is a port of XRay to ARM 32-bit, without Thumb support yet. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: https://reviews.llvm.org/D23931 (LLVM) https://reviews.llvm.org/D23932 (Clang test) Differential Revision: https://reviews.llvm.org/D23933 llvm-svn: 281971
* Revert "[XRay] ARM 32-bit no-Thumb support in compiler-rt"Renato Golin2016-09-081-131/+0
| | | | | | This reverts commit r280890, as the related LLVM commit broke the thumb bots. llvm-svn: 280969
* [XRay] ARM 32-bit no-Thumb support in compiler-rtDean Michael Berris2016-09-081-0/+131
This is a port of XRay to ARM 32-bit, without Thumb support yet. This is one of 3 commits to different repositories of XRay ARM port. The other 2 are: 1. https://reviews.llvm.org/D23931 (LLVM) 2. https://reviews.llvm.org/D23932 (Clang test) Differential Revision: https://reviews.llvm.org/D23933 llvm-svn: 280890
OpenPOWER on IntegriCloud