You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[RFC][Transforms][IPO] Add func suffix in ArgumentPromotion and DeadArgumentElimination
ArgumentPromotion and DeadArgumentElimination passes could change
function signatures but the function name remains the same as before
the transformation. This makes it hard for tracing with bpf programs
where user tends to use function signature in the source.
See discussion [1] for details.
This patch added suffix to functions whose signatures
are changed. The suffix lets users know that function
signature has changed and they need to impact the IR or binary
to find modified signature before tracing those functions.
The suffix for ArgumentPromotion is ".argprom" and
the suffix for DeadArgumentElimination is ".argelim".
The suffix also gives user hints about what kind of
transformation has been done.
With this patch, I built a recent linux kernel with
full LTO enabled. I got 4 functions with only argpromotion like
set_track_update.argelim.argprom
pmd_trans_huge_lock.argprom
...
I got 1058 functions with only deadargelim like
process_bit0.argelim
pci_io_ecs_init.argelim
...
I got 3 functions with both argpromotion and deadargelim
set_track_update.argelim.argprom
zero_pud_populate.argelim.argprom
zero_pmd_populate.argelim.argprom
There are some concerns about func suffix may impact sample based
profiling. I did some experiments and show that this is not the
case. The sample profiling gets func name from dwarf and those
func names in dwarf does not have suffixes added by this patch
and sample profiling works fine with this patch.
[1] #104678
0 commit comments