* Scheduler cleanups, 2/N
@ 2011-03-24 13:10 Bernd Schmidt
2011-03-25 18:31 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Schmidt @ 2011-03-24 13:10 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 102 bytes --]
This prints a bit more information in debugging dumps. Bootstrapped and
tested on i686-linux.
Bernd
[-- Attachment #2: reason.diff --]
[-- Type: text/plain, Size: 2661 bytes --]
* haifa-sched.c (queue_insn): New arg REASON. All callers
changed. Print it in debugging output.
Index: gcc/haifa-sched.c
===================================================================
--- gcc/haifa-sched.c.orig
+++ gcc/haifa-sched.c
@@ -493,7 +493,7 @@ haifa_classify_insn (const_rtx insn)
static int priority (rtx);
static int rank_for_schedule (const void *, const void *);
static void swap_sort (rtx *, int);
-static void queue_insn (rtx, int);
+static void queue_insn (rtx, int, const char *);
static int schedule_insn (rtx);
static void adjust_priority (rtx);
static void advance_one_cycle (void);
@@ -1318,10 +1318,11 @@ swap_sort (rtx *a, int n)
/* Add INSN to the insn queue so that it can be executed at least
N_CYCLES after the currently executing insn. Preserve insns
- chain for debugging purposes. */
+ chain for debugging purposes. REASON will be printed in debugging
+ output. */
HAIFA_INLINE static void
-queue_insn (rtx insn, int n_cycles)
+queue_insn (rtx insn, int n_cycles, const char *reason)
{
int next_q = NEXT_Q_AFTER (q_ptr, n_cycles);
rtx link = alloc_INSN_LIST (insn, insn_queue[next_q]);
@@ -1337,7 +1338,7 @@ queue_insn (rtx insn, int n_cycles)
fprintf (sched_dump, ";;\t\tReady-->Q: insn %s: ",
(*current_sched_info->print_insn) (insn, 0));
- fprintf (sched_dump, "queued for %d cycles.\n", n_cycles);
+ fprintf (sched_dump, "queued for %d cycles (%s).\n", n_cycles, reason);
}
QUEUE_INDEX (insn) = next_q;
@@ -2067,11 +2068,7 @@ queue_to_ready (struct ready_list *ready
&& ready->n_ready - ready->n_debug > MAX_SCHED_READY_INSNS
&& !SCHED_GROUP_P (insn)
&& insn != skip_insn)
- {
- if (sched_verbose >= 2)
- fprintf (sched_dump, "requeued because ready full\n");
- queue_insn (insn, 1);
- }
+ queue_insn (insn, 1, "ready full");
else
{
ready_add (ready, insn, false);
@@ -2975,7 +2972,7 @@ schedule_block (basic_block *target_bb)
insn = ready_remove (&ready, i);
if (insn != skip_insn)
- queue_insn (insn, 1);
+ queue_insn (insn, 1, "list truncated");
}
}
}
@@ -3176,7 +3173,7 @@ schedule_block (basic_block *target_bb)
if (cost >= 1)
{
- queue_insn (insn, cost);
+ queue_insn (insn, cost, "resource conflict");
if (SCHED_GROUP_P (insn))
{
advance = cost;
@@ -3961,7 +3958,7 @@ change_queue_index (rtx next, int delay)
if (delay == QUEUE_READY)
ready_add (readyp, next, false);
else if (delay >= 1)
- queue_insn (next, delay);
+ queue_insn (next, delay, "change queue index");
if (sched_verbose >= 2)
{
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Scheduler cleanups, 2/N
2011-03-24 13:10 Scheduler cleanups, 2/N Bernd Schmidt
@ 2011-03-25 18:31 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2011-03-25 18:31 UTC (permalink / raw)
To: Bernd Schmidt; +Cc: GCC Patches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/24/11 07:09, Bernd Schmidt wrote:
> This prints a bit more information in debugging dumps. Bootstrapped and
> tested on i686-linux.
>
OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNjN9YAAoJEBRtltQi2kC7bokIAJCxFKpr7DzWCZZmXpb19JkY
MHSTK3EYpugF7J4cjq3Png60cwZqdBSjWruVbLIpO1jwVrLHkAoZjuu/7EDaSDW6
zFVLPAdD2wf9ZFtK3o8Rbd93tksyZGxqX4RTZGmbuXnqfCYDJmTLpwRmXCAVzBnB
O4BcaC/Ziy4dwT5D7L+E8B7zr6bPE4dLeIXpd8JJjGRJNWpWRRiJX9ZGDiHbGeRm
Fg5I+jjimng02g7jG+28isR8GWXL1byCXzDHL/aX/l4oxid+Lj2ULxbW6TNT8EPS
hJgqItPcqcIukT1NDGos8awK6HBaoThcPXtHbzxSvDNIYKjBP3qLlgYcDyUlPkg=
=U0C5
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-25 18:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-24 13:10 Scheduler cleanups, 2/N Bernd Schmidt
2011-03-25 18:31 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).