From patchwork Fri May 15 10:36:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 472725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2D119140B0E for ; Fri, 15 May 2015 21:09:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Jfm1jQBn; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-to:resent-date:resent-message-id:message-id :from:date:subject:to; q=dns; s=default; b=Nlor7Yut1h4rXRKP5CBjR EUy19lxeQMprnxi3+VYCskRwLz+KDce98hwVfg0ZmaGkt9IsTe7kybk0B4Zh9a4K hRiU2nxv1GA8S2lwZlc+4yvA5IXP+xkB7LwXUNBSEG5CAopFO63ljTDURzSvwjp2 IStZYGUJ+z39NuivgX/Rvc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-to:resent-date:resent-message-id:message-id :from:date:subject:to; s=default; bh=m5i8QGwvExldQTVnNQO4DWEx43Q =; b=Jfm1jQBnIl2Rg1Ud+KrSpVSrizgX+r92Eqs8t+wxKW19cVlMSm0LgTr8m8H 4lxe7sWhCrNo6o39i+CWqihHs5EiFHxhDDO7KFYdVcTzs6auXA2dM40ocXmO5T9i B8OLeo/rLoAcgQNRS4Vqck+DBf+KUD9+4NLTK/EK635yPVto= Received: (qmail 50781 invoked by alias); 15 May 2015 11:09:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 50696 invoked by uid 89); 15 May 2015 11:09:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 15 May 2015 11:09:03 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5F748ADB5 for ; Fri, 15 May 2015 11:09:00 +0000 (UTC) Resent-From: =?UTF-8?B?TWFydGluIExpxaFrYQ==?= Resent-To: GCC Patches Resent-Date: Fri, 15 May 2015 13:09:00 +0200 Resent-Message-ID: <5555D3CC.40707@suse.cz> Resent-User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 Message-Id: From: mliska Date: Fri, 15 May 2015 12:36:46 +0200 Subject: [PATCH 1/2] dbgcnt: enhance behavior. To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes Hi. Following patch changes GCC so that it exits after -fdbg-cnt-list and counters are sorted in dbgcnt.def file. Ready for trunk? Thanks, Martin gcc/ChangeLog: 2015-05-15 Martin Liska * dbgcnt.def: Sort counters. * opts.c (common_handle_option): Do not compile if -fdbg-cnt-list is enabled. --- gcc/dbgcnt.def | 27 ++++++++++++++------------- gcc/opts.c | 4 ++++ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 4b26e77..95f6b06 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -144,8 +144,8 @@ echo ubound: $ub DEBUG_COUNTER (auto_inc_dec) DEBUG_COUNTER (ccp) DEBUG_COUNTER (cfg_cleanup) -DEBUG_COUNTER (cse2_move2add) DEBUG_COUNTER (cprop) +DEBUG_COUNTER (cse2_move2add) DEBUG_COUNTER (dce) DEBUG_COUNTER (dce_fast) DEBUG_COUNTER (dce_ud) @@ -155,6 +155,7 @@ DEBUG_COUNTER (df_byte_scan) DEBUG_COUNTER (dse) DEBUG_COUNTER (dse1) DEBUG_COUNTER (dse2) +DEBUG_COUNTER (eipa_sra) DEBUG_COUNTER (gcse2_delete) DEBUG_COUNTER (global_alloc_at_func) DEBUG_COUNTER (global_alloc_at_reg) @@ -162,31 +163,31 @@ DEBUG_COUNTER (graphite_scop) DEBUG_COUNTER (hoist) DEBUG_COUNTER (hoist_insn) DEBUG_COUNTER (ia64_sched2) -DEBUG_COUNTER (if_conversion) -DEBUG_COUNTER (if_conversion_tree) DEBUG_COUNTER (if_after_combine) DEBUG_COUNTER (if_after_reload) +DEBUG_COUNTER (if_conversion) +DEBUG_COUNTER (if_conversion_tree) +DEBUG_COUNTER (ira_move) DEBUG_COUNTER (local_alloc_for_sched) +DEBUG_COUNTER (merged_ipa_icf) DEBUG_COUNTER (postreload_cse) DEBUG_COUNTER (pre) DEBUG_COUNTER (pre_insn) -DEBUG_COUNTER (treepre_insert) -DEBUG_COUNTER (tree_sra) -DEBUG_COUNTER (eipa_sra) -DEBUG_COUNTER (vect_loop) -DEBUG_COUNTER (vect_slp) +DEBUG_COUNTER (registered_jump_thread) DEBUG_COUNTER (sched2_func) DEBUG_COUNTER (sched_block) +DEBUG_COUNTER (sched_breakdep) DEBUG_COUNTER (sched_func) DEBUG_COUNTER (sched_insn) -DEBUG_COUNTER (sched_breakdep) DEBUG_COUNTER (sched_region) DEBUG_COUNTER (sel_sched_cnt) -DEBUG_COUNTER (sel_sched_region_cnt) DEBUG_COUNTER (sel_sched_insn_cnt) +DEBUG_COUNTER (sel_sched_region_cnt) DEBUG_COUNTER (sms_sched_loop) -DEBUG_COUNTER (store_motion) DEBUG_COUNTER (split_for_sched2) +DEBUG_COUNTER (store_motion) DEBUG_COUNTER (tail_call) -DEBUG_COUNTER (ira_move) -DEBUG_COUNTER (registered_jump_thread) +DEBUG_COUNTER (treepre_insert) +DEBUG_COUNTER (tree_sra) +DEBUG_COUNTER (vect_loop) +DEBUG_COUNTER (vect_slp) diff --git a/gcc/opts.c b/gcc/opts.c index fed5d12..a5461c5 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1757,8 +1757,12 @@ common_handle_option (struct gcc_options *opts, break; case OPT_fdbg_cnt_: + /* Deferred. */ + break; + case OPT_fdbg_cnt_list: /* Deferred. */ + opts->x_exit_after_options = true; break; case OPT_fdebug_prefix_map_: