DEBUG: Added a path option to tracediff
Review Request #1021 - Created Jan. 29, 2012 and discarded
| Information | |
|---|---|
| William Wang | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
DEBUG: Added a path option to tracediff Added a path option '-p' to tracediff, this is useful when the default cwd quota/space is not large enough to hold all the traces.
Ran tracediff okay: ./util/tracediff -p ~/scratch 'build/ARM_FS| build/ARM_FS_PASS#/gem5.opt' --debug-flags=Exec,Cache,Bus --trace-start=66488126500 -re tests/run.py build/ARM_FS/tests/opt/long/10.linux-boot/arm/linux/realview-o3-dual
Review request changed
Updated (Jan. 29, 2012, 7:19 p.m.)
Description: |
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+13 -8) |
Review request changed
Updated (Jan. 29, 2012, 7:22 p.m.)
Diff: |
Revision 3 (+13 -8) |
|---|
Posted (Feb. 1, 2012, 11:42 p.m.)
Overall this looks worthwhile, thanks for submitting it. I hope you have the time to fix up the minor issues I spotted.
-
util/tracediff (Diff revision 3) -
Shouldn't this default to "." not ""? Otherwise it looks like the code below will place the trace files in the root dir rather than the current dir if -p isn't specified.
-
util/tracediff (Diff revision 3) -
I think this code breaks if you specify both -p and -n in that order (it'll pick up the -p and not the -n). That may not be a common combination but it would be nice to get it right anyway. Seems like we really need a while loop that checks for $ARGV[0][0] eq '-' or something like that (or use the perl equivalent of getopt or parseargs or something, but that could be overkill). It's been a long time since I've done much perl so I can't be more specific than that.
Review request changed
Updated (Feb. 3, 2012, 1:15 a.m.)
Diff: |
Revision 4 (+23 -15) |
|---|
Posted (Feb. 3, 2012, 6:31 a.m.)
-
util/tracediff (Diff revision 4) -
Don't you want to fold the if & while together into: while (@ARGV >= 1 && ($ARGV[0] eq '-n'|| $ARGV[0] eq '-p')) otherwise I think you could have a problem if someone ran: ./tracediff -n because the while loop will iterate checking $ARGV[0] even if all the args have been consumed.
