On Tue, Apr 2, 2024 at 10:03 AM Jan Hubicka <hubi...@ucw.cz> wrote:
>
> > > I am bit worried about commonly used functions getting "infected" by
> > > being called once from ifunc resolver.  I think we only use thread local
> > > storage for indirect call profiling, so we may just disable indirect
> > > call profiling for these functions.
> >
> > Will change it.
> >
> > > Also the patch will be noop with -flto -flto-partition=max, so probably
> > > we need to compute this flag at WPA time and stream to partitions.
> > >
> >
> > Why is it a nop with -flto -flto-partition=max? I got
> >
> > (gdb) bt
> > #0  symtab_node::check_ifunc_callee_symtab_nodes ()
> >     at /export/gnu/import/git/gitlab/x86-gcc/gcc/symtab.cc:1440
> > #1  0x0000000000e487d3 in symbol_table::compile (this=0x7fffea006000)
> >     at /export/gnu/import/git/gitlab/x86-gcc/gcc/cgraphunit.cc:2320
> > #2  0x0000000000d23ecf in lto_main ()
> >     at /export/gnu/import/git/gitlab/x86-gcc/gcc/lto/lto.cc:687
> > #3  0x00000000015254d2 in compile_file ()
> >     at /export/gnu/import/git/gitlab/x86-gcc/gcc/toplev.cc:449
> > #4  0x00000000015284a4 in do_compile ()
> >     at /export/gnu/import/git/gitlab/x86-gcc/gcc/toplev.cc:2154
> > #5  0x0000000001528864 in toplev::main (this=0x7fffffffd84a, argc=16,
> >     argv=0x42261f0) at 
> > /export/gnu/import/git/gitlab/x86-gcc/gcc/toplev.cc:2310
> > #6  0x00000000030a3fe2 in main (argc=16, argv=0x7fffffffd958)
> >     at /export/gnu/import/git/gitlab/x86-gcc/gcc/main.cc:39
> >
> > Do you have a testcase to show that it is a nop?
> Aha, sorry.  I tought this is run during late optimization, but it is
> done early, so LTo partitioning does not mix things up.  So current
> patch modified to disable only instrumentation that needs TLS should be
> fine.
>

Done.  Here is the v3 patch:

https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648733.html

-- 
H.J.

Reply via email to