Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
ea76b2d8 |
| 11-Dec-2024 |
Min-Yih Hsu <min.hsu@sifive.com> |
[XRay][RISCV] RISCV support for XRay (#117368)
Add RISC-V support for XRay. The RV64 implementation has been tested in
both QEMU and in our hardware environment.
Currently this requires D and C
[XRay][RISCV] RISCV support for XRay (#117368)
Add RISC-V support for XRay. The RV64 implementation has been tested in
both QEMU and in our hardware environment.
Currently this requires D and C extensions, but since both RV64GC and
RVA22/RVA23 are becoming mainstream, I don't think this requirement will
be a big problem.
Based on the previous work by @a-poduval :
https://reviews.llvm.org/D117929
---------
Co-authored-by: Ashwin Poduval <ashwin.poduval@gmail.com>
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
4d6a5fc7 |
| 15-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[Driver] Remove unused includes (NFC) (#116316)
Identified with misc-include-cleaner.
|
#
1adca7af |
| 08-Nov-2024 |
Sebastian Kreutzer <SebastianKreutzer@gmx.net> |
Reapply "[XRay][AArch64] Support -fxray-shared (#114431)" (#115300)
This patch implements support for `-fxray-shared` on AArch64 and fixes a
remaining issue in the previous PR #114431.
A bug in
Reapply "[XRay][AArch64] Support -fxray-shared (#114431)" (#115300)
This patch implements support for `-fxray-shared` on AArch64 and fixes a
remaining issue in the previous PR #114431.
A bug in the XRay `CMakeLists.txt` caused the XRay assembly sources to
be built for every architecture in `XRAY_DSO_SUPPORTED_ARCH` on Apple.
This led to the compiler trying to compile AArch64 assembly for X86
targets and vice versa.
This is addressed here by ensuring that assembly sources are only built
for the matching architecture (see fixup commit).
**Original PR description:**
This patch adds support for `-fxray-shared` on AArch64. This feature,
introduced in #113548 for x86_64, enables the instrumentation of shared
libraries with XRay.
Changes:
- Adds AArch64 to the list of targets supporting `-fxray-shared`
- Introduces PIC versions of the AArch64 XRay trampolines
- Adjusts relevant XRay tests
show more ...
|
#
0428f2cb |
| 05-Nov-2024 |
Kai Nacke <kai.peter.nacke@ibm.com> |
[SystemZ][XRay] Enable XRay for SystemZ in clang (#113254)
With the support for xray for SystemZ in place, the option can now be enabled in clang.
|
#
cb9700eb |
| 05-Nov-2024 |
Felipe de Azevedo Piovezan <fpiovezan@apple.com> |
Revert "[XRay][AArch64] Support -fxray-shared" (#115022)
Reverts llvm/llvm-project#114431
|
#
7767aa45 |
| 05-Nov-2024 |
Sebastian Kreutzer <SebastianKreutzer@gmx.net> |
[XRay][AArch64] Support -fxray-shared (#114431)
This patch adds support for `-fxray-shared` on AArch64. This feature,
introduced in #113548 for x86_64, enables the instrumentation of shared
librar
[XRay][AArch64] Support -fxray-shared (#114431)
This patch adds support for `-fxray-shared` on AArch64. This feature,
introduced in #113548 for x86_64, enables the instrumentation of shared
libraries with XRay.
Changes:
- Adds AArch64 to the list of targets supporting `-fxray-shared`
- Introduces PIC versions of the AArch64 XRay trampolines
- Adjusts relevant XRay tests
show more ...
|
Revision tags: llvmorg-19.1.3 |
|
#
e738a5d8 |
| 25-Oct-2024 |
Sebastian Kreutzer <SebastianKreutzer@gmx.net> |
Reapply " [XRay] Add support for instrumentation of DSOs on x86_64 (#90959)" (#113548)
This fixes remaining issues in my previous PR #90959.
Changes:
- Removed dependency on LLVM header in `xray
Reapply " [XRay] Add support for instrumentation of DSOs on x86_64 (#90959)" (#113548)
This fixes remaining issues in my previous PR #90959.
Changes:
- Removed dependency on LLVM header in `xray_interface.cpp`
- Fixed XRay patching for some targets due to missing changes in
architecture-specific patching functions
- Addressed some remaining compiler warnings that I missed in the
previous patch
- Formatting
I have tested these changes on `x86_64` (natively), as well as
`ppc64le`, `aarch64` and `arm32` (cross-compiled and emulated using
qemu).
**Original description:**
This PR introduces shared library (DSO) support for XRay based on a
revised version of the implementation outlined in [this
RFC](https://discourse.llvm.org/t/rfc-upstreaming-dso-instrumentation-support-for-xray/73000).
The feature enables the patching and handling of events from DSOs,
supporting both libraries linked at startup or explicitly loaded, e.g.
via `dlopen`.
This patch adds the following:
- The `-fxray-shared` flag to enable the feature (turned off by default)
- A small runtime library that is linked into every instrumented DSO,
providing position-independent trampolines and code to register with the
main XRay runtime
- Changes to the XRay runtime to support management and patching of
multiple objects
These changes are fully backward compatible, i.e. running without
instrumented DSOs will produce identical traces (in terms of recorded
function IDs) to the previous implementation.
Due to my limited ability to test on other architectures, this feature
is only implemented and tested with x86_64. Extending support to other
architectures is fairly straightforward, requiring only a
position-independent implementation of the architecture-specific
trampoline implementation (see
`compiler-rt/lib/xray/xray_trampoline_x86_64.S` for reference).
This patch does not include any functionality to resolve function IDs
from DSOs for the provided logging/tracing modes. These modes still work
and will record calls from DSOs, but symbol resolution for these
functions in not available. Getting this to work properly requires
recording information about the loaded DSOs and should IMO be discussed
in a separate RFC, as there are mulitple feasible approaches.
---------
Co-authored-by: Sebastian Kreutzer <sebastian.kreutzer@tu-darmstadt.de>
show more ...
|
Revision tags: llvmorg-19.1.2 |
|
#
90627a5a |
| 11-Oct-2024 |
Mikhail Goncharov <goncharov.mikhail@gmail.com> |
Revert "[XRay] Add support for instrumentation of DSOs on x86_64 (#90959)"
This reverts commit a4402039bffd788b9af82435fd5a2fb311fdc6e8 and 4451f9f812d458f6b53785b27869674caf01e67b
|
#
4451f9f8 |
| 11-Oct-2024 |
Sebastian Kreutzer <sebastian.kreutzer@stud.tu-darmstadt.de> |
[XRay] Fix LLVM include in xray_interface.cpp (#111978)
Removes a dependency on LLVM in `xray_interface.cpp` by replacing
`llvm_unreachable` with compiler-rt's `UNREACHABLE`.
Applies clang-format
[XRay] Fix LLVM include in xray_interface.cpp (#111978)
Removes a dependency on LLVM in `xray_interface.cpp` by replacing
`llvm_unreachable` with compiler-rt's `UNREACHABLE`.
Applies clang-format to some unformatted changes.
Original PR: #90959
show more ...
|
#
a4402039 |
| 11-Oct-2024 |
Sebastian Kreutzer <SebastianKreutzer@gmx.net> |
[XRay] Add support for instrumentation of DSOs on x86_64 (#90959)
This PR introduces shared library (DSO) support for XRay based on a
revised version of the implementation outlined in [this
RFC](h
[XRay] Add support for instrumentation of DSOs on x86_64 (#90959)
This PR introduces shared library (DSO) support for XRay based on a
revised version of the implementation outlined in [this
RFC](https://discourse.llvm.org/t/rfc-upstreaming-dso-instrumentation-support-for-xray/73000).
The feature enables the patching and handling of events from DSOs,
supporting both libraries linked at startup or explicitly loaded, e.g.
via `dlopen`.
This patch adds the following:
- The `-fxray-shared` flag to enable the feature (turned off by default)
- A small runtime library that is linked into every instrumented DSO,
providing position-independent trampolines and code to register with the
main XRay runtime
- Changes to the XRay runtime to support management and patching of
multiple objects
These changes are fully backward compatible, i.e. running without
instrumented DSOs will produce identical traces (in terms of recorded
function IDs) to the previous implementation.
Due to my limited ability to test on other architectures, this feature
is only implemented and tested with x86_64. Extending support to other
architectures is fairly straightforward, requiring only a
position-independent implementation of the architecture-specific
trampoline implementation (see
`compiler-rt/lib/xray/xray_trampoline_x86_64.S` for reference).
This patch does not include any functionality to resolve function IDs
from DSOs for the provided logging/tracing modes. These modes still work
and will record calls from DSOs, but symbol resolution for these
functions in not available. Getting this to work properly requires
recording information about the loaded DSOs and should IMO be discussed
in a separate RFC, as there are mulitple feasible approaches.
@petrhosek @jplehr
show more ...
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
ef33d6cb |
| 14-Jul-2023 |
Weining Lu <luweining@loongson.cn> |
[XRay] Add initial support for loongarch64
Only support patching FunctionEntry/FunctionExit/FunctionTailExit for now.
Reviewed By: MaskRay, xen0n Co-Authored-By: zhanglimin <zhanglimin@loongson.cn>
[XRay] Add initial support for loongarch64
Only support patching FunctionEntry/FunctionExit/FunctionTailExit for now.
Reviewed By: MaskRay, xen0n Co-Authored-By: zhanglimin <zhanglimin@loongson.cn>
Differential Revision: https://reviews.llvm.org/D140727
show more ...
|
#
d5bebb3f |
| 21-Jun-2023 |
Oleksii Lozovskyi <me@ilammy.net> |
[Driver] Allow XRay on Apple Silicon
Codegen can handle XRay for AArch64, tell the driver to allow it.
Differential Revision: https://reviews.llvm.org/D145849
|
#
e1051414 |
| 21-Jun-2023 |
Fangrui Song <i@maskray.me> |
[Driver] Allow XRay for more architectures on ELF systems
Codegen OS-agnostic for ELF and the runtime is mostly OS-agnostic. It seems unnecessary to make restriction.
While here, rewrite test/Drive
[Driver] Allow XRay for more architectures on ELF systems
Codegen OS-agnostic for ELF and the runtime is mostly OS-agnostic. It seems unnecessary to make restriction.
While here, rewrite test/Driver/XRay/xray-instrument*.c to be more conventional: specify --target= explicitly instead of relying on the configured default target (which needs `REQUIRES:`).
I am not sure enumerating every supported architecture is useful, so we just test a few.
show more ...
|
#
407dcaf0 |
| 19-Jun-2023 |
Fangrui Song <i@maskray.me> |
[Driver] Correct -fnoxray-link-deps to -fno-xray-link-deps
and removed unused CC1Option. Also change -whole-archive to the canonical spelling and improve tests.
|
#
63bd6d9e |
| 11-Jun-2023 |
Fangrui Song <i@maskray.me> |
[Driver] Default to -fxray-function-index
As explained by commit 849f1dd15e92fda2b83dbb6144e6b28b2cb946e0, -fxray-function-index was the original default but was accidentally flipped by commit d8a8e
[Driver] Default to -fxray-function-index
As explained by commit 849f1dd15e92fda2b83dbb6144e6b28b2cb946e0, -fxray-function-index was the original default but was accidentally flipped by commit d8a8e5d6240a1db809cd95106910358e69bbf299. Restore the previous behavior.
Originally reported by Oleksii Lozovskyi in D145848.
show more ...
|
#
849f1dd1 |
| 11-Jun-2023 |
Fangrui Song <i@maskray.me> |
[XRay] Rename XRayOmitFunctionIndex to XRayFunctionIndex
Apply my post-commit comment on D81995. The negative name misguided commit d8a8e5d6240a1db809cd95106910358e69bbf299 (`[clang][cli] Remove mar
[XRay] Rename XRayOmitFunctionIndex to XRayFunctionIndex
Apply my post-commit comment on D81995. The negative name misguided commit d8a8e5d6240a1db809cd95106910358e69bbf299 (`[clang][cli] Remove marshalling from Opt{In,Out}FFlag`) to:
* accidentally flip the option to not emit the xray_fn_idx section. * change -fno-xray-function-index (instead of -fxray-function-index) to emit xray_fn_idx
This patch renames XRayOmitFunctionIndex and makes -fxray-function-index emit xray_fn_idx, but the default remains -fno-xray-function-index .
show more ...
|
#
c6e065ef |
| 11-Jun-2023 |
Fangrui Song <i@maskray.me> |
[Driver] Simplify xray options
Also add driver test missed by D87953 (-fxray-function-groups=). (test/Driver/XRay/lit.local.cfg misunderstands how driver testing works. We place the test in test/Dri
[Driver] Simplify xray options
Also add driver test missed by D87953 (-fxray-function-groups=). (test/Driver/XRay/lit.local.cfg misunderstands how driver testing works. We place the test in test/Driver instead.)
show more ...
|
#
d25992e7 |
| 11-Jun-2023 |
Fangrui Song <i@maskray.me> |
[Driver] Simplify -fxray-instrument handling
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2 |
|
#
afb785f5 |
| 02-Aug-2022 |
Fangrui Song <i@maskray.me> |
[Driver] Remove Separate form for XRay options
Supporting something like `-fxray-instruction-threshold= 1` is not intended.
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
1e68c799 |
| 09-Dec-2021 |
Brian Cain <bcain@quicinc.com> |
Reapply [xray] add support for hexagon
Adds x-ray support for hexagon to llvm codegen, clang driver, compiler-rt libs.
Differential Revision: https://reviews.llvm.org/D113638
Reapplying this after
Reapply [xray] add support for hexagon
Adds x-ray support for hexagon to llvm codegen, clang driver, compiler-rt libs.
Differential Revision: https://reviews.llvm.org/D113638
Reapplying this after 543a9ad7c460bb8d641b1b7c67bbc032c9bfdb45, which fixes the leak introduced there.
show more ...
|
#
ab28cb1c |
| 09-Dec-2021 |
Brian Cain <bcain@quicinc.com> |
Revert "[xray] add support for hexagon"
This reverts commit 543a9ad7c460bb8d641b1b7c67bbc032c9bfdb45.
|
#
543a9ad7 |
| 09-Dec-2021 |
Brian Cain <bcain@quicinc.com> |
[xray] add support for hexagon
Adds x-ray support for hexagon to llvm codegen, clang driver, compiler-rt libs.
Differential Revision: https://reviews.llvm.org/D113638
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
6f7fbdd2 |
| 18-Sep-2020 |
Ian Levesque <ianlevesque@fb.com> |
[xray] Function coverage groups
Add the ability to selectively instrument a subset of functions by dividing the functions into N logical groups and then selecting a group to cover. By selecting diff
[xray] Function coverage groups
Add the ability to selectively instrument a subset of functions by dividing the functions into N logical groups and then selecting a group to cover. By selecting different groups over time you could cover the entire application incrementally with lower overhead than instrumenting the entire application at once.
Differential Revision: https://reviews.llvm.org/D87953
show more ...
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
f39000b4 |
| 17-Jun-2020 |
Fangrui Song <maskray@google.com> |
[Driver] Delete CC1 -fxray-function-index and clean up some tests
|
#
7c7c8e0d |
| 17-Jun-2020 |
Ian Levesque <ianlevesque@fb.com> |
[xray] Option to omit the function index
Summary: Add a flag to omit the xray_fn_idx to cut size overhead and relocations roughly in half at the cost of reduced performance for single function patch
[xray] Option to omit the function index
Summary: Add a flag to omit the xray_fn_idx to cut size overhead and relocations roughly in half at the cost of reduced performance for single function patching. Minor additions to compiler-rt support per-function patching without the index.
Reviewers: dberris, MaskRay, johnislarry
Subscribers: hiraditya, arphaman, cfe-commits, #sanitizers, llvm-commits
Tags: #clang, #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D81995
show more ...
|