[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] xen: Drop logic for old clang versions.


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • Date: Mon, 11 Aug 2025 11:37:46 +0200
  • Arc-authentication-results: i=1; bugseng.com; arc=none smtp.remote-ip=162.55.131.47
  • Arc-message-signature: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; c=relaxed/relaxed; t=1754905067; h=DKIM-Signature:MIME-Version:Date:From:To:Cc:Subject:In-Reply-To: References:Message-ID:X-Sender:Organization:Content-Type: Content-Transfer-Encoding; bh=B+VCLIM59gNO7oGRL5RbaIyllKvsSR+p7SZBqqqyJgc=; b=rsk7fDjJx/QcV3mHeCFtevo7ZMugQvqoObBdB5BWOeYUlirQ03Jb2CM6wpCYg6AycjA7 h/8705csLGzt93uaqwCcfBloPHRcGCB7DsGbMj3sUHEAdwHZlfZCZDYw+NUkFFxTFW/eR 0YTvHiCw5HGyH5Tj9nKh/B3Bbovl1lNQpc9ggOql9QV8o1+PnPiWvYXUYl8CXOPJwXBEr +/H0TnTYp+AzOHig74l1CNfCVJMHvrP+XgLgogJ4XlvlOtUTsq0VtQWop9eyoao5cAPmu NdipGi1jSHa5F79xWgqVDmse+iZxGtMI/hfrAFygIi5/dimU4ZTCbHWmzsypgchu25M/y I7TlbSxxVyRU4VbEaKKbXCC6+lnP1DQ88aXkHphbEsRXkFXLOdffk9VViWQgcl9QnsAUL Oxsg/qpMYJiiPz7G5BZiu1jJDebQ/pmO4RXFfHagtzfSnIVxpxLQr7UUQ7tY3TYZ0JG6s yg1yFFMmfc0nU55BArxruJ8a17b0IYcA8PmoZVGctrPQL9JqrFNb1Ig30QcAIkFTA47BN vMuyrIDYX7zdgXhOqC3m61InbTR7jpMGEh7A8jYx2/gzE/HOheaW3F8vZuGVwo66b5Qpn sA3iHSvG3ZAsd2D0RAJa+M+sFnaTyXE0ww80X8q4k1p7mXL92ZrKwpS0WKcwm0o=
  • Arc-seal: i=1; d=bugseng.com; s=openarc; a=rsa-sha256; cv=none; t=1754905067; b=TpoGD1L2+fY/HabGhqi3AyvB0j6fnspRCTaQsDcv4irAa36GEeUyYXMUNfksJvxqVITE K5UANGizzf+m+oJ638rifzJoJj+ByOwFWS2R2vD0s8cBaTnoDZunprMn0iKmNtiZqXMpG vDdcLJYMRCsV6PsCm8ROI6pYMRzDbka9Y/ekf4UXT9KceDQk+ChUyLofCZgvK0HeDHeUO OKuqTsLqe3X2dEFvngSMnIcbk5bVUhQbmcJn6czwOBw8VI9tQ6WoBL2mEG/rDjx02TN/O Wlk2yKVu1koLyPU+X76Q+vPzZfq/5UMvUzv9oEN/JRZL9wck1goHFVHQcRAdv9PqDLpgE j2HvzeDH1hhVotXp7ZY8ZGh+ZnJFUWraCfxpkxopVycdbCZC+lCFA7AjJ+rV0n4Fl1ZkK kc5iZzjVBN/6JsyBNy3togwG/i7i32bp518uW+S6JtrPZl+dupbncQFfWlyIlinl+8HlK jJvC6++PGZCsIV7q2F3Jse5NIKMWXul1P31NVNwBudy/3RXhxoDK/HBmhMxkh/FJFZaq4 SIt+aSwbs2++LaoQZm6STngO1QTYNUdCEVAJ+L3j/McSAh7AgZS0U9X23Bo7xNODCuIKh xyr2sGFIP2Ek6zTdwlfc89deJKeL0c9ZLAVwigVLdo6B1IzU/fNuNCWmutrVJUc=
  • Authentication-results: bugseng.com; arc=none smtp.remote-ip=162.55.131.47
  • Cc: nicola.vetrini@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 11 Aug 2025 09:37:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-08-11 09:47, Roger Pau Monné wrote:
On Sun, Aug 10, 2025 at 03:03:53PM +0200, nicola.vetrini@xxxxxxxxx wrote:
From: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>

The enforced toolchain baseline for clang is version 11,
therefore this logic is effectively dead code.

No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxx>

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

---
Mentioned in https://gitlab.com/xen-project/xen/-/issues/201
---
 xen/common/coverage/llvm.c   | 4 ----
 xen/include/xen/self-tests.h | 9 +--------
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/xen/common/coverage/llvm.c b/xen/common/coverage/llvm.c
index 50d7a3c5d301..517b2aa8c202 100644
--- a/xen/common/coverage/llvm.c
+++ b/xen/common/coverage/llvm.c
@@ -44,12 +44,8 @@
     ((uint64_t)'f' << 16) | ((uint64_t)'R' << 8)  | ((uint64_t)129)
 #endif

-#if __clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ >= 9)
 #define LLVM_PROFILE_VERSION    4
 #define LLVM_PROFILE_NUM_KINDS  2
-#else
-#error "clang version not supported with coverage"
-#endif

Rant: most of the LLVM coverage stuff is already kind of dead code, as
the format of the data changes between versions and there's no way for
LLVM to generate the blob itself using a builtin function or
similar.  We haven't kept up with new formats, and now it's not
possible to parse the output coverage data when using newish LLVM
versions.

Linux converts it's LLVM coverage data to gcov format (which AFAIK is
way more stable), and exports it in gcov format.  We should consider
importing that from Linux.

Thanks, Roger.

Fair point. Generally I found coverage reports generated using LLVM tooling a bit more informative than gcov's, but I don't know how much work would it be to adapt Xen for newer versions of LLVM.

--
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.