This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GDB / SIM 7.3.1 Cosmetic patch for profile title


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]