+Tue Feb 24 22:45:39 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * sim-profile.c (profile_print): Delete duplicate test of
+ PROFILE_INSN_IDX.
+ (profile_print_pc): Exit early if data collection not set up.
+
Mon Feb 23 20:45:57 1998 Mark Alexander <marka@cygnus.com>
* nltvals.def: Regenerate with MN10300 additions.
/* Default profiling support.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
unsigned total;
unsigned i;
+ if (PROFILE_PC_COUNT (profile) == 0)
+ return;
+
sim_io_printf (sd, "Program Counter Statistics:\n\n");
/* First pass over data computes various things. */
sim_cpu *cpu = STATE_CPU (sd, c);
PROFILE_DATA *data = CPU_PROFILE_DATA (cpu);
- if (MAX_NR_PROCESSORS > 1)
- sim_io_printf (sd, "CPU %d\n\n", c);
+ if (MAX_NR_PROCESSORS > 1
+ && (0
+#if WITH_PROFILE_INSN_P
+ || PROFILE_FLAGS (data) [PROFILE_INSN_IDX]
+#endif
+#if WITH_PROFILE_MEMORY_P
+ || PROFILE_FLAGS (data) [PROFILE_MEMORY_IDX]
+#endif
+#if WITH_PROFILE_CORE_P
+ || PROFILE_FLAGS (data) [PROFILE_CORE_IDX]
+#endif
+#if WITH_PROFILE_MODEL_P
+ || PROFILE_FLAGS (data) [PROFILE_MODEL_IDX]
+#endif
+#if WITH_PROFILE_SCACHE_P && WITH_SCACHE
+ || PROFILE_FLAGS (data) [PROFILE_SCACHE_IDX]
+#endif
+#if WITH_PROFILE_PC_P
+ || PROFILE_FLAGS (data) [PROFILE_PC_IDX]
+#endif
+ ))
+ {
+ sim_io_printf (sd, "CPU %d\n\n", c);
+ }
#if WITH_PROFILE_INSN_P
if (PROFILE_FLAGS (data) [PROFILE_INSN_IDX])