public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: turn down verbosity of "process-message"
@ 2018-12-04 21:36 David Malcolm
  2018-12-05  9:57 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: David Malcolm @ 2018-12-04 21:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

When debugging a failing test, I typically invoke DejaGnu at
verbosity level 2 (via RUNTESTFLAGS="-v -v dg.exp=something"),
so that DejaGnu prints the command line used to invoke the
compiler; specifically these two sites:
  target.exp "Invoking the compiler as "
  remote.exp "Executing on $hostname"
which are both verbosity level 2.

Unfortunately I run into an O(n^2) issue with logging from
process-message:

  verbose "process-message:\n${dg-messages}" 2

where, as each message each processed, it emits the state
of dg-messages, containing the new message and all messages so far,
leading to exponentially-increasing output at level 2 as more test
messages are added.

This patch papers over the problem by moving the
problematic message to verbosity level 3.

Successfully regrtested on x86_64-pc-linux-gnu.

OK for trunk?

gcc/testsuite/ChangeLog:
	* lib/gcc-dg.exp (process-message): Change verbosity level of
	"verbose" from 2 to 3.
	(dg-locus): Likewise.
---
 gcc/testsuite/lib/gcc-dg.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 305dd3c..054d884 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1165,7 +1165,7 @@ proc process-message { msgproc msgprefix dgargs } {
     set newentry [lreplace $newentry 2 2 $expmsg]
 
     set dg-messages [lreplace ${dg-messages} end end $newentry]
-    verbose "process-message:\n${dg-messages}" 2
+    verbose "process-message:\n${dg-messages}" 3
 }
 
 # Look for messages that don't have standard prefixes.
@@ -1199,7 +1199,7 @@ proc dg-locus { args } {
 
     set newentry [lreplace $newentry 2 2 $expmsg]
     set dg-messages [lreplace ${dg-messages} end end $newentry]
-    verbose "process-message:\n${dg-messages}" 2
+    verbose "process-message:\n${dg-messages}" 3
 }
 
 # Handle output from -fopt-info for MSG_OPTIMIZED_LOCATIONS:
-- 
1.8.5.3

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

* Re: [PATCH] testsuite: turn down verbosity of "process-message"
  2018-12-04 21:36 [PATCH] testsuite: turn down verbosity of "process-message" David Malcolm
@ 2018-12-05  9:57 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2018-12-05  9:57 UTC (permalink / raw)
  To: David Malcolm; +Cc: GCC Patches

On Tue, Dec 4, 2018 at 10:36 PM David Malcolm <dmalcolm@redhat.com> wrote:
>
> When debugging a failing test, I typically invoke DejaGnu at
> verbosity level 2 (via RUNTESTFLAGS="-v -v dg.exp=something"),
> so that DejaGnu prints the command line used to invoke the
> compiler; specifically these two sites:
>   target.exp "Invoking the compiler as "
>   remote.exp "Executing on $hostname"
> which are both verbosity level 2.
>
> Unfortunately I run into an O(n^2) issue with logging from
> process-message:
>
>   verbose "process-message:\n${dg-messages}" 2
>
> where, as each message each processed, it emits the state
> of dg-messages, containing the new message and all messages so far,
> leading to exponentially-increasing output at level 2 as more test
> messages are added.
>
> This patch papers over the problem by moving the
> problematic message to verbosity level 3.
>
> Successfully regrtested on x86_64-pc-linux-gnu.
>
> OK for trunk?

OK

> gcc/testsuite/ChangeLog:
>         * lib/gcc-dg.exp (process-message): Change verbosity level of
>         "verbose" from 2 to 3.
>         (dg-locus): Likewise.
> ---
>  gcc/testsuite/lib/gcc-dg.exp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
> index 305dd3c..054d884 100644
> --- a/gcc/testsuite/lib/gcc-dg.exp
> +++ b/gcc/testsuite/lib/gcc-dg.exp
> @@ -1165,7 +1165,7 @@ proc process-message { msgproc msgprefix dgargs } {
>      set newentry [lreplace $newentry 2 2 $expmsg]
>
>      set dg-messages [lreplace ${dg-messages} end end $newentry]
> -    verbose "process-message:\n${dg-messages}" 2
> +    verbose "process-message:\n${dg-messages}" 3
>  }
>
>  # Look for messages that don't have standard prefixes.
> @@ -1199,7 +1199,7 @@ proc dg-locus { args } {
>
>      set newentry [lreplace $newentry 2 2 $expmsg]
>      set dg-messages [lreplace ${dg-messages} end end $newentry]
> -    verbose "process-message:\n${dg-messages}" 2
> +    verbose "process-message:\n${dg-messages}" 3
>  }
>
>  # Handle output from -fopt-info for MSG_OPTIMIZED_LOCATIONS:
> --
> 1.8.5.3
>

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

end of thread, other threads:[~2018-12-05  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 21:36 [PATCH] testsuite: turn down verbosity of "process-message" David Malcolm
2018-12-05  9:57 ` Richard Biener

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).