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

Re: [PATCH v4] xen: Support LLVM raw profile versions 5, 6, 7, 8, 9, and 10



On Mon, Nov 10, 2025 at 8:03 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 27.10.2025 23:36, Andrew Cooper wrote:
> > On 27/10/2025 9:30 pm, Saman Dehghan wrote:
> >> This change enables compatibility for measuring code coverage
> >> with Clang versions 11 through 20 by supporting their respective raw
> >> profile formats.
> >>
> >> 1- Added support for LLVM raw profile versions 5, 6, 7, 8, 9, and 10.
> >> 2- Initialized llvm_profile_header for all versions based on llvm source
> >>    code in compiler-rt/include/profile/InstrProfData.inc for each version.
> >> 3- We tested this patch for all Clang versions from 11 through 20
> >>    on x86 platform.
> >> 4- Fixed linking warnings related to LLVM profile sections in x86.
> >>
> >>
> >> Signed-off-by: Saman Dehghan <samaan.dehghan@xxxxxxxxx>
> >> Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> >> Tested-by: Wentao Zhang <wentaoz5@xxxxxxxxxxxx>
> >> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> >> ---
> >> Changes from v3 to v4:
> >>   1- Use LLVM_PROFILE_VERSION in preprocessor conditionals
> >>      instead of __clang_major__.
> >>   2- Use DIV_ROUND_UP helper.
> >>   3- Remove unnecessary zero initialization inside struct.
> >>   4- Remove fallback macro definitions in linker script.
> >> Changes from v2 to v3:
> >>   1- Additionally support raw profile version 5, 6, 7 in clang 11, 12, 13.
> >>   2- Fix coverage related linking warnings in x86.
> >>   3- Revert unnecessary type changes, casting, etc.
> >> ---
> >
> > Excellent.  Thankyou.  This all looks in order.  I've committed it.
>
> I thought I would backport this, but I would need a variant that wouldn't
> regress profile version 4 on the older branches

Thanks Jan for offering to backport this. Which target branches do you
have in your mind?

> regress profile version 4 on the older branches

Do you mean some of these branches are still using clang < 11 so that
we need to adapt our patch accordingly? Let me know how we can help.

Thanks
Saman

>
> Jan



 


Rackspace

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