lkml.org 
[lkml]   [2026]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] iommu/generic_pt: disable GCOV for iommu_amdv1.o
From
On 4/3/26 18:07, Jason Gunthorpe wrote:
> On Thu, Apr 02, 2026 at 05:10:12PM +0300, Konstantin Khorenko wrote:
>> With -fprofile-update=atomic in global CFLAGS_GCOV, GCC cannot
>> constant-fold FIELD_PREP() expressions inside deeply inlined page table
>> walker functions. GCC creates .constprop clones of the inline level
>> functions, which get their own GCOV instrumentation that prevents
>> constant evaluation of compile-time checks.
>
> That's hasn't been the issue here. gcc gets confused where it thinks a
> value is constant so the builtin_constant checks inside FIELD_PREP
> trigger, but if the value is constant then control flow leading up to
> it excludes that path ever happening.
>
> Somehow gcov is breaking the elimination of the impossible branch, and
> I think this is all just compiler bugs.
>
> Also, I thought this was fixed by adding the always_inline?

You are definitely right, Jason, thank you for the hint!

Sending v2 with __always_inline.

--
Konstantin Khorenko

\
 
 \ /
  Last update: 2026-04-09 19:01    [W:0.106 / U:3.910 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog