From 810dee6e981ee0a7e1425bfc092128d7640dd4ff Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sun, 22 Oct 2006 12:51:00 -0400 Subject: [PATCH] Have tracediff print warning if no traceflags are set. Elaborate on description a bit. --HG-- extra : convert_revision : 2649961b53d6fb2774ddfb60219415ae4251db2d --- util/tracediff | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/util/tracediff b/util/tracediff index ee28d660d..b25efe9b2 100755 --- a/util/tracediff +++ b/util/tracediff @@ -41,6 +41,10 @@ # you'll have to quote the arg or escape the '|' with a backslash # so that the shell doesn't think you're doing a pipe. # +# In other words, the arguments should look like the command line you +# want to run, with "|" used to list the alternatives for the parts +# that you want to differ between the two runs. +# # For example: # # % tracediff m5.opt --opt1 "--opt2|--opt3" --opt4 @@ -79,6 +83,14 @@ $sim2 = shift @cmd2; $args1 = join(' ', @cmd1); $args2 = join(' ', @cmd2); +# Common mistake: if you don't set any traceflags this often isn't +# doing what you want. +if ($args1 !~ /--trace-flags/) { + print "****\n"; + print "**** WARNING: no trace flags set... you may not be diffing much!\n"; + print "****\n"; +} + # Run individual invocations in separate dirs so output and intermediate # files (particularly config.py and config.ini) don't conflict. $dir1 = "tracediff-$$-1";