sebastiankreutzer wrote:
@felipepiovezan @juliannagele @MaskRay Could one of you merge this, if it looks
good to you?
Buildkite seems to be broken at the moment, but it works locally for me
(cross-compiled with Apple toolchain).
https://github.com/llvm/llvm-project/pull/115300
__
https://github.com/sebastiankreutzer created
https://github.com/llvm/llvm-project/pull/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
f
sebastiankreutzer wrote:
@felipepiovezan @juliannagele Sorry for the delayed response.
This is quite strange, since the issues seem to be on the x86 side...
https://github.com/llvm/llvm-project/pull/114431
___
cfe-commits mailing list
cfe-commits@lists
sebastiankreutzer wrote:
@MaskRay Thanks! Would you mind pushing the commit? I don't have write access.
https://github.com/llvm/llvm-project/pull/114431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/114431
>From 63760cffc53815f3c8398bd3351486b658d0a1a8 Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 31 Oct 2024 16:01:29 +0100
Subject: [PATCH 1/2] [XRay][AArch64] Support -fxray-shared
---
c
https://github.com/sebastiankreutzer edited
https://github.com/llvm/llvm-project/pull/114431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sebastiankreutzer wrote:
Tagging potential reviewers: @jplehr @MaskRay @petrhosek
https://github.com/llvm/llvm-project/pull/114431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sebastiankreutzer created
https://github.com/llvm/llvm-project/pull/114431
This patch adds support for `-fxray-shared` in AArch64. This feature,
introduced in #113548 for x86_64, enables the instrumentation of shared
libraries with XRay.
Changes:
- Adds AArch64 to the list
sebastiankreutzer wrote:
@rupprecht If this looks good to you, could you commit it? I don't have write
access.
https://github.com/llvm/llvm-project/pull/113892
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/sebastiankreutzer edited
https://github.com/llvm/llvm-project/pull/113892
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,17 @@
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fPIC -fxray-instrument
-fxray-shared -c %s -o /dev/null 2>&1 | FileCheck %s
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fpic -fxray-instrument
-fxray-shared -c %s -o /dev/null 2>&1 | FileCheck %
sebastiankreutzer wrote:
@MatzeB
https://github.com/llvm/llvm-project/pull/113892
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sebastiankreutzer created
https://github.com/llvm/llvm-project/pull/113892
Compiling with `-fxray-shared` requires position-independent code.
Some tests do not explicitly specify this, thus falling back to the compiler
default.
If, for example, Clang is compiled with `-DCLA
sebastiankreutzer wrote:
Buildkite failure is due to unrelated errors in
`libcxx/test/libcxx/headers_in_modulemap.sh.py`
https://github.com/llvm/llvm-project/pull/113548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
sebastiankreutzer wrote:
Tagging reviewers of previous PR: @jplehr @MaskRay @androm3da @deanberris
https://github.com/llvm/llvm-project/pull/113548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
sebastiankreutzer wrote:
Buildbot failures are addressed in the follow-up PR #112930
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sebastiankreutzer wrote:
@jplehr
https://github.com/llvm/llvm-project/pull/112930
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sebastiankreutzer created
https://github.com/llvm/llvm-project/pull/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
>From e5
sebastiankreutzer wrote:
Buildbot failures are due to including an LLVM header in the XRay runtime. Will
fix ASAP.
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
https://github.com/sebastiankreutzer edited
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -97,27 +97,50 @@ enum XRayPatchingStatus {
/// for possible result values.
extern XRayPatchingStatus __xray_patch();
+extern XRayPatchingStatus __xray_patch_object(int32_t ObjId);
+
/// Reverses the effect of __xray_patch(). See XRayPatchingStatus for possible
/// result
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 86e252cb84803bfaa2ec096b671ef366fd3ac5cb Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/3] [XRay] Add DSO support for XRay instrumentatio
sebastiankreutzer wrote:
Any further comments, @petrhosek?
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27,6 +27,7 @@ class XRayArgs {
XRayInstrSet InstrumentationBundle;
llvm::opt::Arg *XRayInstrument = nullptr;
bool XRayRT = true;
+ bool XRayEnableShared = false;
sebastiankreutzer wrote:
Done
https://github.com/llvm/llvm-project/pull/90959
@@ -2922,6 +2922,11 @@ def fxray_selected_function_group :
HelpText<"When using -fxray-function-groups, select which group of functions
to instrument. Valid range is 0 to fxray-function-groups - 1">,
MarshallingInfoInt, "0">;
+defm xray_enable_shared : BoolFOption<"xray-e
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 86e252cb84803bfaa2ec096b671ef366fd3ac5cb Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/2] [XRay] Add DSO support for XRay instrumentatio
sebastiankreutzer wrote:
I rebased on upstream `main` again and tested locally.
@MaskRay Let me know if you have further comments or concerns.
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 86e252cb84803bfaa2ec096b671ef366fd3ac5cb Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH] [XRay] Add DSO support for XRay instrumentation on
sebastiankreutzer wrote:
Ping
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2887,6 +2887,10 @@ def fxray_selected_function_group :
HelpText<"When using -fxray-function-groups, select which group of functions
to instrument. Valid range is 0 to fxray-function-groups - 1">,
MarshallingInfoInt, "0">;
+def fxray_enable_shared : Flag<["-"], "fxray-
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 5143ef41ac88d88e53ebbf7d404f5a86ccd0a5c1 Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/8] [XRay] Add DSO support for XRay instrumentatio
sebastiankreutzer wrote:
@petrhosek @MaskRay
Could one of you have a look to give final approval?
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
sebastiankreutzer wrote:
> You might want to get approval from someone else - I'm not even remotely
> close to a maintainer here.
Will do - thanks for taking the time to review!
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing
sebastiankreutzer wrote:
Needed to rebase because buildkite was complaining about archived pipelines.
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
@@ -471,42 +518,123 @@ uint16_t __xray_register_event_type(
}
XRayPatchingStatus __xray_patch() XRAY_NEVER_INSTRUMENT {
- return controlPatching(true);
+ XRayPatchingStatus CombinedStatus{SUCCESS};
sebastiankreutzer wrote:
After looking at it again, I have
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 5143ef41ac88d88e53ebbf7d404f5a86ccd0a5c1 Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/7] [XRay] Add DSO support for XRay instrumentatio
@@ -63,6 +63,10 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args)
{
<< XRayInstrument->getSpelling() << Triple.str();
}
+ if (Args.hasFlag(options::OPT_fxray_enable_shared,
+ options::OPT_fno_xray_enable_shared, false))
+XRayEnab
@@ -0,0 +1,62 @@
+//===-- xray_init.cpp ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 1f0484b73ad0bb9b40e3cd86d8abad4af14e32dc Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/7] [XRay] Add DSO support for XRay instrumentatio
https://github.com/sebastiankreutzer edited
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,62 @@
+//===-- xray_init.cpp ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,62 @@
+//===-- xray_init.cpp ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -63,6 +63,10 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args)
{
<< XRayInstrument->getSpelling() << Triple.str();
}
+ if (Args.hasFlag(options::OPT_fxray_enable_shared,
+ options::OPT_fno_xray_enable_shared, false))
+XRayEnab
@@ -471,42 +518,123 @@ uint16_t __xray_register_event_type(
}
XRayPatchingStatus __xray_patch() XRAY_NEVER_INSTRUMENT {
- return controlPatching(true);
+ XRayPatchingStatus CombinedStatus{SUCCESS};
sebastiankreutzer wrote:
I would argue yes, since in this c
@@ -471,42 +518,123 @@ uint16_t __xray_register_event_type(
}
XRayPatchingStatus __xray_patch() XRAY_NEVER_INSTRUMENT {
- return controlPatching(true);
+ XRayPatchingStatus CombinedStatus{SUCCESS};
+ for (size_t I = 0; I < __xray_num_objects(); ++I) {
+if (!isObjectLoad
@@ -111,6 +156,71 @@ void __xray_init() XRAY_NEVER_INSTRUMENT {
#endif
}
+// Default visibility is hidden, so we have to explicitly make it visible to
+// DSO.
+SANITIZER_INTERFACE_ATTRIBUTE int32_t __xray_register_dso(
+const XRaySledEntry *SledsBegin, const XRaySledEntry
@@ -50,14 +52,72 @@ atomic_uint8_t XRayInitialized{0};
// This should always be updated before XRayInitialized is updated.
SpinMutex XRayInstrMapMutex;
-XRaySledMap XRayInstrMap;
+// XRaySledMap XRayInstrMap;
+// Contains maps for the main executable as well as DSOs.
+// std:
@@ -0,0 +1,62 @@
+//===-- xray_init.cpp ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -346,8 +392,8 @@ else() # not Apple
DEFS ${XRAY_COMMON_DEFINITIONS}
OBJECT_LIBS RTXrayBASIC
PARENT_TARGET xray)
- # Profiler Mode runtime
- add_compiler_rt_runtime(clang_rt.xray-profiling
+# Profiler Mode runtime
+add_compiler_rt_runtime(clang_r
@@ -1520,10 +1520,14 @@ bool tools::addSanitizerRuntimes(const ToolChain &TC,
const ArgList &Args,
}
bool tools::addXRayRuntime(const ToolChain&TC, const ArgList &Args,
ArgStringList &CmdArgs) {
- if (Args.hasArg(options::OPT_shared))
-return false;
-
- if (TC.getXRayA
sebastiankreutzer wrote:
> > @androm3da @MaskRay I'm tagging you because I'm having trouble to get
> > feedback to this PR, and you seem to be the most recent contributors to
> > XRay. Would one of you be willing to review it? Any other pointers on who
> > to get in touch with are also much ap
sebastiankreutzer wrote:
@androm3da @MaskRay
I'm tagging you because I'm having trouble to get feedback to this PR, and you
seem to be the most recent contributors to XRay.
Would one of you be willing to review it?
Any other pointers on who to get in touch with are also much appreciated.
htt
sebastiankreutzer wrote:
> @sebastiankreutzer hey, were you able to reach the maintainers of llvm-xray
> and probe them about its dev status? If yes, can you pls share how to reach
> them and what did they say?
Unfortunately no, I have no direct contact. It was my impression that none of
the
sebastiankreutzer wrote:
Ping
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 1f0484b73ad0bb9b40e3cd86d8abad4af14e32dc Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/6] [XRay] Add DSO support for XRay instrumentatio
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 1f0484b73ad0bb9b40e3cd86d8abad4af14e32dc Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/5] [XRay] Add DSO support for XRay instrumentatio
https://github.com/sebastiankreutzer updated
https://github.com/llvm/llvm-project/pull/90959
>From 1f0484b73ad0bb9b40e3cd86d8abad4af14e32dc Mon Sep 17 00:00:00 2001
From: Sebastian Kreutzer
Date: Thu, 26 Oct 2023 15:13:05 +0200
Subject: [PATCH 1/4] [XRay] Add DSO support for XRay instrumentatio
sebastiankreutzer wrote:
Can't reproduce the buildbot failures, will try to find the cause.
https://github.com/llvm/llvm-project/pull/90959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/sebastiankreutzer created
https://github.com/llvm/llvm-project/pull/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
59 matches
Mail list logo