Message ID | 6a2508ac-9673-c759-c0a1-bd78a67105f6@suse.cz |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:b5d6:b0:2b9:3548:2db5 with SMTP id v22csp2840549pxt; Tue, 2 Aug 2022 01:46:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uLYrxS2Txjf8aMPGfmn0yqBOO/wMT9l/Nvtt++Ghnob9usKp73yKFMQjpt8xE2fr+qQr5G X-Received: by 2002:a17:906:9c82:b0:6df:baa2:9f75 with SMTP id fj2-20020a1709069c8200b006dfbaa29f75mr15560897ejc.762.1659429995344; Tue, 02 Aug 2022 01:46:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659429995; cv=none; d=google.com; s=arc-20160816; b=yCjB6Y+lcacy1Yr9RjF2gpytglwrx9nyhOI8uEUps0vRWx87Q2Aj7LYZrbXeCokwqn RPq4Q2sG33uF//VYHwbif7WXAZuwo9xMj7q2eC7A5VTgImyZOuXmlp0avhhGjZHUXNgd 6VgFAVHCjyCF59SboxvpZbAYCoEqD5qPXUgxibxce3q2NqCLjsRfnxuJeKdMwCqzwCM8 2zC85b9k4Y7+MUfAKIIMRsTLaftU6y++Bume9ke31lb33aCEhCzLS+oSTnWa3IBaDwX+ y2JC3wEqAAnNDuGR3AMgkBI1aUOo+holnW9xD41hrX7eVtoF7YRe7DqG8q9Bww6OGGQ5 qITw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:to:subject:from:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=UpIDGLN67U/2CzVVj51NBwDbwRRMnYFJKZQkTTERT7w=; b=Jon/L1eYjyChLEqdOI7lD7kxeHDX92svGBJsdd6R9WKnI5BN43QjPohTLZopOJxHYV REug99/loDn9z3sRl6AJAcYxS2IO3Btz/JS8qsYN47I6sRy0EwgkSQFjYD2Fvqop6Bex MyPC+AGKGjDMMrc8GMS+wo3hr4dSgv0Rdo95zFoi3/0rSyHAocVd2fYADfcZgignLdw8 fAMArGGnpac8I6WgvdqhrVAgg5aEIIiu21TG/WZwcLv6FsTTTvHl6KgZJJIGJaC1I5VS zk6HL2Pmck+FX7T23wTepCmhZfVQvVk8sThfYxeraV7i9ns4zDfOeq3lt8AZ+9diJX0f R3EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@suse.cz header.s=susede2_rsa header.b="1f/eJJzn"; dkim=neutral (no key) header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id cr13-20020a170906d54d00b00730a134ccfasi1256811ejc.572.2022.08.02.01.46.34 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 01:46:35 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@suse.cz header.s=susede2_rsa header.b="1f/eJJzn"; dkim=neutral (no key) header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C84023853828 for <ouuuleilei@gmail.com>; Tue, 2 Aug 2022 08:46:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id DE23D3858D37 for <gcc-patches@gcc.gnu.org>; Tue, 2 Aug 2022 08:46:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE23D3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BB60720584; Tue, 2 Aug 2022 08:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1659429967; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpIDGLN67U/2CzVVj51NBwDbwRRMnYFJKZQkTTERT7w=; b=1f/eJJznmnxcM4ztvXhxR3MpS/SiWnsn5ILVvpBF9tQDrFqJwEW4R9KL9tRczy1cUui3Uy uG0Gi1gd+gYsyvnM4gZkwG8QftStJ+sZEhOx8I1yvoZAD1kj1PLtMs1i9Ku4O7+yreE0fg TcUy2xA2XXfPQWusVpAcmtEUBMrsRsI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1659429967; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpIDGLN67U/2CzVVj51NBwDbwRRMnYFJKZQkTTERT7w=; b=JTpoT/P92jaoX0BkmON01PJQKbm2usb73bz/3p8XQOU/ZVwLqhWteLVHGCz4fjYRls5BzQ ApH6N/KgKmNjfDCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A12DE1345B; Tue, 2 Aug 2022 08:46:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CmxiJk/k6GJmUwAAMHmgww (envelope-from <mliska@suse.cz>); Tue, 02 Aug 2022 08:46:07 +0000 Message-ID: <6a2508ac-9673-c759-c0a1-bd78a67105f6@suse.cz> Date: Tue, 2 Aug 2022 10:46:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= <mliska@suse.cz> Subject: [PATCH] IPA: reduce what we dump in normal mode To: gcc-patches@gcc.gnu.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: Jan Hubicka <hubicka@ucw.cz> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1740038466480719956?= X-GMAIL-MSGID: =?utf-8?q?1740038466480719956?= |
Series |
IPA: reduce what we dump in normal mode
|
|
Commit Message
Martin Liška
Aug. 2, 2022, 8:46 a.m. UTC
gcc/ChangeLog: * profile.cc (compute_branch_probabilities): Dump details only if TDF_DETAILS. * symtab.cc (symtab_node::dump_base): Do not dump pointer unless TDF_ADDRESS is used, it makes comparison harder. --- gcc/profile.cc | 2 +- gcc/symtab.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
Comments
On Tue, Aug 2, 2022 at 10:46 AM Martin Liška <mliska@suse.cz> wrote: OK > gcc/ChangeLog: > > * profile.cc (compute_branch_probabilities): Dump details only > if TDF_DETAILS. > * symtab.cc (symtab_node::dump_base): Do not dump pointer unless > TDF_ADDRESS is used, it makes comparison harder. > --- > gcc/profile.cc | 2 +- > gcc/symtab.cc | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gcc/profile.cc b/gcc/profile.cc > index 08af512cbca..92de821b8bb 100644 > --- a/gcc/profile.cc > +++ b/gcc/profile.cc > @@ -766,7 +766,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) > sum2 += freq2; > } > } > - if (dump_file) > + if (dump_file && (dump_flags & TDF_DETAILS)) > { > double nsum1 = 0, nsum2 = 0; > stats.qsort (cmp_stats); > diff --git a/gcc/symtab.cc b/gcc/symtab.cc > index 8670337416e..f2d96c0268b 100644 > --- a/gcc/symtab.cc > +++ b/gcc/symtab.cc > @@ -894,7 +894,8 @@ symtab_node::dump_base (FILE *f) > }; > > fprintf (f, "%s (%s)", dump_asm_name (), name ()); > - dump_addr (f, " @", (void *)this); > + if (dump_flags & TDF_ADDRESS) > + dump_addr (f, " @", (void *)this); > fprintf (f, "\n Type: %s", symtab_type_names[type]); > > if (definition) > -- > 2.37.1 >
> gcc/ChangeLog: > > * profile.cc (compute_branch_probabilities): Dump details only > if TDF_DETAILS. > * symtab.cc (symtab_node::dump_base): Do not dump pointer unless > TDF_ADDRESS is used, it makes comparison harder. > --- > gcc/profile.cc | 2 +- > gcc/symtab.cc | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gcc/profile.cc b/gcc/profile.cc > index 08af512cbca..92de821b8bb 100644 > --- a/gcc/profile.cc > +++ b/gcc/profile.cc > @@ -766,7 +766,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) > sum2 += freq2; > } > } > - if (dump_file) > + if (dump_file && (dump_flags & TDF_DETAILS)) If you disable dumping, you can also disable the collection of stats which is guarded by if (dump_file) as well. Otherwise the patch is OK. > { > double nsum1 = 0, nsum2 = 0; > stats.qsort (cmp_stats); > diff --git a/gcc/symtab.cc b/gcc/symtab.cc > index 8670337416e..f2d96c0268b 100644 > --- a/gcc/symtab.cc > +++ b/gcc/symtab.cc > @@ -894,7 +894,8 @@ symtab_node::dump_base (FILE *f) > }; > > fprintf (f, "%s (%s)", dump_asm_name (), name ()); > - dump_addr (f, " @", (void *)this); > + if (dump_flags & TDF_ADDRESS) > + dump_addr (f, " @", (void *)this); > fprintf (f, "\n Type: %s", symtab_type_names[type]); > > if (definition) > -- > 2.37.1 >
On 8/2/22 18:27, Jan Hubicka wrote: > If you disable dumping, you can also disable the collection of stats > which is guarded by if (dump_file) as well. Otherwise the patch is OK. Sure, good point! I'm going to push the following. Thanks, Martin
diff --git a/gcc/profile.cc b/gcc/profile.cc index 08af512cbca..92de821b8bb 100644 --- a/gcc/profile.cc +++ b/gcc/profile.cc @@ -766,7 +766,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) sum2 += freq2; } } - if (dump_file) + if (dump_file && (dump_flags & TDF_DETAILS)) { double nsum1 = 0, nsum2 = 0; stats.qsort (cmp_stats); diff --git a/gcc/symtab.cc b/gcc/symtab.cc index 8670337416e..f2d96c0268b 100644 --- a/gcc/symtab.cc +++ b/gcc/symtab.cc @@ -894,7 +894,8 @@ symtab_node::dump_base (FILE *f) }; fprintf (f, "%s (%s)", dump_asm_name (), name ()); - dump_addr (f, " @", (void *)this); + if (dump_flags & TDF_ADDRESS) + dump_addr (f, " @", (void *)this); fprintf (f, "\n Type: %s", symtab_type_names[type]); if (definition)