Deleted Added
sdiff udiff text old ( 338:6cf264d111b4 ) new ( 354:fbfbff4f09c3 )
full compact
1#! /usr/bin/env perl
2
3# Copyright (c) 2003 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 27 unchanged lines hidden (view full) ---

36# "filename" is a pipe (|). Thus to compare the instruction traces
37# from two versions of m5 (m5a and m5b), you can do this:
38#
39# rundiff 'm5a --trace:flags=InstExec |' 'm5b --trace:flags=InstExec |'
40#
41
42use strict;
43
44#
45# For the highest-quality (minimal) diffs, we can use the
46# Algorithm::Diff package. If you don't have this installed, or want
47# the script to run faster (like 3-4x faster, based on informal
48# observation), set $use_complexdiff to 0; then a built-in, simple,
49# and generally quite adequate algorithm will be used instead.
50my $use_complexdiff = 0;
51
52#if ($use_complexdiff) {
53# use Algorithm::Diff qw(traverse_sequences);
54#};
55
56my $lookahead_lines = 200;
57my $precontext_lines = 3;
58my $postcontext_lines = 3;
59
60my $file1 = $ARGV[0];
61my $file2 = $ARGV[1];
62
63die "Need two args." if (!(defined($file1) && defined($file2)));
64
65my ($fh1, $fh2);
66open($fh1, $file1) or die "Can't open $file1";
67open($fh2, $file2) or die "Can't open $file2";

--- 210 unchanged lines hidden ---