On 10.11.2025 22:26, Saman Dehghan wrote:
> On Mon, Nov 10, 2025 at 8:03 AM Jan Beulich <[email protected]> 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 <[email protected]>
>>>> Release-Acked-By: Oleksii Kurochko <[email protected]>
>>>> Tested-by: Wentao Zhang <[email protected]>
>>>> Acked-by: Andrew Cooper <[email protected]>
>>>> ---
>>>> 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?

The two ones in general maintenance, 4.20 and 4.19. I expect a single patch
will do, i.e. will apply to both equally.

>> 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.

Well, the introduction of 11 as the baseline requirement did happen in the
4.21 dev cycle. Prior to that, 3.5 was the baseline. As we only had support
for profile version 4 (Clang 3.9 onwards as it looks), only that version
would need covering. Of course, if other versions could be easily supported,
that might be fine as well. Yet this isn't a requirement at all.

Jan

Reply via email to