Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-05 Thread rep . dot . nop
On 5 April 2024 03:03:05 CEST, "H.J. Lu" wrote: >On Thu, Apr 4, 2024 at 5:34 PM wrote: >> >> On 3 April 2024 15:49:13 CEST, "H.J. Lu" wrote: > >> + /* Skip if it has been visited. */ >> + unsigned int uid = e->caller->get_uid (); >> + if (bitmap_bit_p (ifunc_ref_map, uid)) >> +

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-04 Thread H.J. Lu
On Thu, Apr 4, 2024 at 5:34 PM wrote: > > On 3 April 2024 15:49:13 CEST, "H.J. Lu" wrote: > > > >> OK witht that change. > >> Honza > > > >I am checking in this patch with the updated comments: > > > > /* Disable indirect call profiling for an IFUNC resolver and its > > callees since it

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-04 Thread rep . dot . nop
On 3 April 2024 15:49:13 CEST, "H.J. Lu" wrote: >> OK witht that change. >> Honza > >I am checking in this patch with the updated comments: > > /* Disable indirect call profiling for an IFUNC resolver and its > callees since it requires TLS which hasn't been set up yet when > the

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread Peter Bergner
On 4/3/24 10:45 AM, Andrew Pinski wrote: > On Wed, Apr 3, 2024 at 8:32 AM Peter Bergner wrote: > I think you misunderstood the patch/situtation. Most ifunc resolves > don't use TLS at all; what is happening here is that the profiler > (-fprofile-generate) is adding TLS usage to the ifunc resolver

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread Andrew Pinski
On Wed, Apr 3, 2024 at 8:32 AM Peter Bergner wrote: > > On 4/3/24 7:40 AM, H.J. Lu wrote: > > We can't profile indirect calls to IFUNC resolvers nor their callees as > > it requires TLS which hasn't been set up yet when the dynamic linker is > > resolving IFUNC symbols. > > > > Add an IFUNC

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread H.J. Lu
On Wed, Apr 3, 2024 at 8:31 AM Peter Bergner wrote: > > On 4/3/24 7:40 AM, H.J. Lu wrote: > > We can't profile indirect calls to IFUNC resolvers nor their callees as > > it requires TLS which hasn't been set up yet when the dynamic linker is > > resolving IFUNC symbols. > > > > Add an IFUNC

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread Peter Bergner
On 4/3/24 7:40 AM, H.J. Lu wrote: > We can't profile indirect calls to IFUNC resolvers nor their callees as > it requires TLS which hasn't been set up yet when the dynamic linker is > resolving IFUNC symbols. > > Add an IFUNC resolver caller marker to cgraph_node and set it if the > function is

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread H.J. Lu
On Wed, Apr 3, 2024 at 6:38 AM Jan Hubicka wrote: > > > We can't profile indirect calls to IFUNC resolvers nor their callees as > > it requires TLS which hasn't been set up yet when the dynamic linker is > > resolving IFUNC symbols. > > > > Add an IFUNC resolver caller marker to cgraph_node and

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread Jan Hubicka
> We can't profile indirect calls to IFUNC resolvers nor their callees as > it requires TLS which hasn't been set up yet when the dynamic linker is > resolving IFUNC symbols. > > Add an IFUNC resolver caller marker to cgraph_node and set it if the > function is called by an IFUNC resolver.

[PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread H.J. Lu
We can't profile indirect calls to IFUNC resolvers nor their callees as it requires TLS which hasn't been set up yet when the dynamic linker is resolving IFUNC symbols. Add an IFUNC resolver caller marker to cgraph_node and set it if the function is called by an IFUNC resolver. Disable indirect