+# Script to simplify using rundiff on trace outputs from two
+# invocations of m5.
+#
+# ******Note that you need to enable some trace flags in the args in order
+# to do anything useful!******
+#
+# Script arguments are handled uniformly as follows:
+# - If the argument does not contain a '|' character, it is appended
+# to both command lines.
+# - If the argument has a '|' character in it, the text on either side
+# of the '|' is appended to the respective command lines. Note that
+# 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
+# would compare these two runs:
+# m5.opt --opt1 --opt2 --opt4
+# m5.opt --opt1 --opt3 --opt4
+#
+# If you want to compare two different simulator binaries, put a '|'
+# in the first script argument ("path1/m5.opt|path2/m5.opt"). If you
+# want to add arguments to one run only, just put a '|' in with text
+# only on one side ("--onlyOn1|"). You can do this with multiple
+# arguments together too ("|-a -b -c" adds three args to the second
+# run only).
+#
+
+use FindBin;