From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 6EA0E3858412 for ; Tue, 2 Apr 2024 17:03:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6EA0E3858412 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kam.mff.cuni.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6EA0E3858412 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712077412; cv=none; b=HuB9RNevwsJxTxnwMxIJBdhWTQ+mVFRwKHEok5iWbS1oX4xoB6b+FN0W+WehCz7f+khDMY5u81cR2ClrpU593/vQlG0yo5Pee1blCkkzfxs5DHygybKjXNr6N6+PBlY5baAtolNdvQsS9mW05pPibiMineFkfktE38Csk7NKiVs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712077412; c=relaxed/simple; bh=9+918GDc/d5udw370gr+I9tdNFRg8PrHZd1/bAoApRg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=bWkqTfgtAdbq51AdvRcT1ZRSi7l9enoMlxUMPgwfDwZpXGFHf8gHeBd5T86Wush8gl0AxosF6naf2kGoj1NdHRgTpY61AobKM+DfiafFu7upTV8pHgvFRtMbPp5ABpg+rbRMFLkK0QoULIiTmH1D6R44TSJkwX7kq00h8XgtaSQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id DD0BF286031; Tue, 2 Apr 2024 19:03:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1712077407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YTtAudvgq1LQBrpdeeXvt5xzqVR+c6njyv9MR2roPK8=; b=VyV14kxsYp0RzWndtWqMcH+KIy3qDdBk8XR4J/jj1BK7W6pI9A9LsRctiLfpR17AGvKpLV iWkAEbWfzaNb0JCqfwe349SYMDg/WKksJlwOrgy3T3Ow7WGUZnWPALw7XEVEkbpcg6TW8X Tu3tYrKzVzCv8reNYXcRJ8k77NcWi9E= Date: Tue, 2 Apr 2024 19:03:27 +0200 From: Jan Hubicka To: "H.J. Lu" Cc: GCC Patches Subject: Re: PING: [PATCH v2] tree-profile: Don't instrument an IFUNC resolver nor its callees Message-ID: References: <20240305214521.326316-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,JMQ_SPF_NEUTRAL,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > > 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. Honza > > -- > H.J.