[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


  • To: Saman Dehghan <samaan.dehghan@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 11 Nov 2025 08:57:10 +0100
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wentao Zhang <wentaoz5@xxxxxxxxxxxx>, Matthew L Weber <matthew.l.weber3@xxxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 11 Nov 2025 07:57:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.11.2025 22:26, Saman Dehghan wrote:
> 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?

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



 


Rackspace

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