This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] FRV --profile-parallel fixes
- From: Dave Brolley <brolley at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 10 Sep 2003 16:59:45 -0400
- Subject: [patch] FRV --profile-parallel fixes
I have committed the attached patch which corrects an entry in and adds
new entries to the 'slot_names' table. It also optimizes the collection
of VLIW slot statistics by not examining slots which contain no insns.
Dave
2003-09-10 Dave Brolley <brolley@redhat.com>
* profile.c (slot_names): FM1 was listed twice. Changed first
instance to FM0. Added IALL, FMALL and FMLOW.
(print_parallel): Don't examine slots with no insns.
Index: sim/frv/profile.c
===================================================================
RCS file: /cvs/src/src/sim/frv/profile.c,v
retrieving revision 1.1
diff -c -p -r1.1 profile.c
*** sim/frv/profile.c 29 Aug 2003 16:35:46 -0000 1.1
--- sim/frv/profile.c 10 Sep 2003 20:38:19 -0000
***************
*** 1,6 ****
/* frv simulator machine independent profiling code.
! Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Red Hat
This file is part of the GNU simulators.
--- 1,6 ----
/* frv simulator machine independent profiling code.
! Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Red Hat
This file is part of the GNU simulators.
*************** print_cache (SIM_CPU *cpu, FRV_CACHE *ca
*** 1706,1717 ****
sim_io_printf (sd, "\n");
}
static char *
slot_names[] =
{
"none",
! "I0", "I1", "I01",
! "FM1", "FM1", "FM01",
"B0", "B1", "B01",
"C"
};
--- 1706,1720 ----
sim_io_printf (sd, "\n");
}
+ /* This table must correspond to the UNIT_ATTR table in
+ opcodes/frv-desc.h. Only the units up to UNIT_C need be
+ listed since the others cannot occur after mapping. */
static char *
slot_names[] =
{
"none",
! "I0", "I1", "I01", "IALL",
! "FM0", "FM1", "FM01", "FMALL", "FMLOW",
"B0", "B1", "B01",
"C"
};
*************** print_parallel (SIM_CPU *cpu, int verbos
*** 1747,1758 ****
int max_name_len = 0;
for (i = UNIT_NIL + 1; i < UNIT_NUM_UNITS; ++i)
{
! int len;
! if (INSNS_IN_SLOT (i) > max_val)
! max_val = INSNS_IN_SLOT (i);
! len = strlen (slot_names[i]);
! if (len > max_name_len)
! max_name_len = len;
}
if (max_val > 0)
{
--- 1750,1764 ----
int max_name_len = 0;
for (i = UNIT_NIL + 1; i < UNIT_NUM_UNITS; ++i)
{
! if (INSNS_IN_SLOT (i))
! {
! int len;
! if (INSNS_IN_SLOT (i) > max_val)
! max_val = INSNS_IN_SLOT (i);
! len = strlen (slot_names[i]);
! if (len > max_name_len)
! max_name_len = len;
! }
}
if (max_val > 0)
{