Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* GDB / SIM 7.3.1 Cosmetic patch for profile title
@ 2011-10-17  7:13 John Wehle
  2011-10-17 16:00 ` Mike Frysinger
  2011-10-19  1:05 ` Joel Brobecker
  0 siblings, 2 replies; 7+ messages in thread
From: John Wehle @ 2011-10-17  7:13 UTC (permalink / raw)
  To: gdb-patches

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;
 	  }
     }
 
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-20 16:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-17  7:13 GDB / SIM 7.3.1 Cosmetic patch for profile title John Wehle
2011-10-17 16:00 ` Mike Frysinger
2011-10-19  1:05 ` Joel Brobecker
2011-10-19  2:08   ` Joel Brobecker
2011-10-20  9:26     ` Mike Frysinger
2011-10-20 16:21       ` Joel Brobecker
2011-10-20 16:35         ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox