From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25852 invoked by alias); 17 Oct 2011 04:28:41 -0000 Received: (qmail 25825 invoked by uid 22791); 17 Oct 2011 04:28:39 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from feith1.FEITH.COM (HELO feith1.FEITH.COM) (192.251.93.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Oct 2011 04:28:24 +0000 Received: from jwlab.FEITH.COM (jwlab.FEITH.COM [192.251.93.16]) by feith1.FEITH.COM (8.14.4+Sun/8.12.9) with ESMTP id p9H4SNmU023995 for ; Mon, 17 Oct 2011 00:28:23 -0400 (EDT) (envelope-from john@jwlab.FEITH.COM) Received: from jwlab.FEITH.COM (localhost [127.0.0.1]) by jwlab.FEITH.COM (8.14.4+Sun/8.14.4) with ESMTP id p9H4SNQr025997 for ; Mon, 17 Oct 2011 00:28:23 -0400 (EDT) Received: (from john@localhost) by jwlab.FEITH.COM (8.14.4+Sun/8.14.4/Submit) id p9H4SMZO025996 for gdb-patches@sourceware.org; Mon, 17 Oct 2011 00:28:22 -0400 (EDT) Date: Mon, 17 Oct 2011 07:13:00 -0000 From: John Wehle Message-Id: <201110170428.p9H4SMZO025996@jwlab.FEITH.COM> To: gdb-patches@sourceware.org Subject: GDB / SIM 7.3.1 Cosmetic patch for profile title MIME-Version: 1.0 Content-Type: text/plain X-DCC-dmv.com-Metrics: feith1; whitelist Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00455.txt.bz2 Currently doing: tomi-unknown-elf-run -v -p program results in: Summary profiling results: Summary profiling results: Summary profiling results: Summary profiling results: Instruction Statistics Total: 6,212 insns ... The issue being that "Summary profiling results" is displayed multiple times in a row. This patch fixes profile_info so that the title is only displayed once. The enclosed patch has been tested on FreeBSD with gdb configured for tomi Borealis (a processor under development by Venray Technology). ChangeLog: Mon Oct 17 00:14:40 EDT 2011 John Wehle (john@feith.com) * sim-profile.c (profile_info): Only print the title once. -- John Wehle ------------------8<------------------------8<------------------------ --- gdb/sim/common/sim-profile.c 2011-03-14 23:16:17.000000000 -0400 +++ gdb/sim/common/sim-profile.c 2011-09-08 23:43:49.000000000 -0400 @@ -1132,7 +1122,7 @@ profile_info (SIM_DESC sd, int verbose) /* FIXME: If the number of processors can be selected on the command line, then MAX_NR_PROCESSORS will need to take an argument of `sd'. */ - for (c = 0; c < MAX_NR_PROCESSORS; ++c) + for (c = 0; c < MAX_NR_PROCESSORS && ! print_title_p; ++c) { sim_cpu *cpu = STATE_CPU (sd, c); PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); @@ -1142,6 +1132,7 @@ profile_info (SIM_DESC sd, int verbose) { profile_printf (sd, cpu, "Summary profiling results:\n\n"); print_title_p = 1; + break; } } -------------------------------------------------------------------------