Changeset 139902 in webkit


Ignore:
Timestamp:
Jan 16, 2013 11:25:40 AM (11 years ago)
Author:
eric@webkit.org
Message:

Remove --shark* support from sunspider/run-sunspider now that Shark is dead
https://bugs.webkit.org/show_bug.cgi?id=99512

Reviewed by Darin Adler.

PerformanceTests/SunSpider:

I tried to use --instruments, but that also seems broken (in the same way before/after this patch).

  • sunspider:

(runTestsOnce):

Tools:

  • Scripts/run-sunspider:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/SunSpider/ChangeLog

    r124558 r139902  
     12013-01-16  Eric Seidel  <eric@webkit.org>
     2
     3        Remove --shark* support from sunspider/run-sunspider now that Shark is dead
     4        https://bugs.webkit.org/show_bug.cgi?id=99512
     5
     6        Reviewed by Darin Adler.
     7
     8        I tried to use --instruments, but that also seems broken (in the same way before/after this patch).
     9
     10        * sunspider:
     11        (runTestsOnce):
     12
    1132012-08-02  Filip Pizlo  <fpizlo@apple.com>
    214
  • trunk/PerformanceTests/SunSpider/sunspider

    r110389 r139902  
    3434
    3535my $showHelp = 0;
    36 my $runShark = 0;
    37 my $runShark20 = 0;
    38 my $runSharkCache = 0;
    3936my $runInstruments = 0;
    4037my $ubench = 0;
     
    5754  --runs            Number of times to run tests (default: $testRuns)
    5855  --tests           Only run tests matching provided pattern
    59   --shark           Sample execution time with the Mac OS X "Shark" performance testing tool (implies --runs=1)
    60   --shark20         Like --shark, but with a 20 microsecond sampling interval
    61   --shark-cache     Like --shark, but performs a L2 cache-miss sample instead of time sample
    6256  --instruments     Sample execution time with the Mac OS X "Instruments" tool (Time Profile) (implies --runs=1)
    6357  --suite           Select a specific benchmark suite. The default is sunspider-1.0
     
    7165           'shell=s' => \$jsShellPath,
    7266           'args=s' => \$jsShellArgs,
    73            'shark' => \$runShark,
    74            'shark20' => \$runShark20,
    75            'shark-cache' => \$runSharkCache,
    7667           'instruments' => \$runInstruments,
    7768           'suite=s' => \$suite,
     
    9384$suitePath = "tests/" . $suitePath unless ($suite =~ /\//);
    9485
    95 $runShark = 1 if $runSharkCache;
    96 $runShark = 20 if $runShark20;
    97 $testRuns = 1 if $runShark || $runInstruments;
    98 if ($runShark && ! -x "/usr/bin/shark") {
    99     die "Please install CHUD tools from http://developer.apple.com/tools/download/\n";
    100 }
    101 
    102 my $sharkCacheProfileIndex = 0;
    103 if ($runSharkCache) {
    104     my $sharkProfileList = `shark -l 2>&1`;
    105     for my $profile (split(/\n/, $sharkProfileList)) {
    106         $profile =~ /(\d+) - (.+)/;
    107         next  unless (defined $1);
    108         my $profileIndex = $1;
    109         my $profileName = $2;
    110         if ($profileName =~ /L2 Cache/) {
    111             $sharkCacheProfileIndex = $profileIndex;
    112             print "Using Shark L2 Cache Miss Profile: " . $profile . "\n";
    113             last;
    114         }
    115     }
    116     die "Failed to find L2 Cache Miss Profile for --shark-cache\n"  unless ($sharkCacheProfileIndex);
    117 }
     86$testRuns = 1 if $runInstruments;
    11887
    11988if (!$jsShellPath || $showHelp) {
     
    166135}
    167136
    168 sub runTestsOnce($$)
    169 {
    170     my ($useShark, $useInstruments) = @_;
     137sub runTestsOnce($)
     138{
     139    my ($useInstruments) = @_;
    171140    my $shellArgs = $jsShellArgs . " -f $prefixFile -f resources/sunspider-standalone-driver.js 2> " . File::Spec->devnull();
    172141    my $output;
    173     if ($useShark) {
    174         my $intervalArg = $useShark == 20 ? "-I 20u" : "";
    175         my $cacheArg = $runSharkCache ? "-c $sharkCacheProfileIndex" : "";
    176         $output = `shark $intervalArg $cacheArg -i -1-q "$jsShellPath" $shellArgs`;
    177     } elsif ($useInstruments) {
     142    if ($useInstruments) {
    178143        $output = `instruments -t "resources/TimeProfile20us.tracetemplate" "$jsShellPath" $shellArgs`;
    179144    } else {
     
    211176}
    212177die "No tests to run"  unless scalar(@tests);
    213 print STDERR "Running SunSpider once for warmup, then " . ($runShark ? "under Shark" : ($runInstruments ? "under Instruments" : "$testRuns time" . ($testRuns == 1 ? "" : "s"))) . "\n";
     178print STDERR "Running SunSpider once for warmup, then " . ($runInstruments ? "under Instruments" : "$testRuns time" . ($testRuns == 1 ? "" : "s")) . "\n";
    214179writePrefixFile();
    215180
    216 runTestsOnce(0, 0);
     181runTestsOnce(0);
    217182print "Discarded first run.\n";
    218183
     
    223188print "[";
    224189while ($count++ < $testRuns) {
    225     $result = runTestsOnce($runShark, $runInstruments);
     190    $result = runTestsOnce($runInstruments);
    226191    $result =~ s/\r\n/\n/g;
    227192    chomp $result;
     
    239204
    240205print("\nResults are located at $resultsFile\n");
    241 
    242 if ($runShark) {
    243     my $newestMShark = newestFile(".", qr/\.mshark$/);
    244     if ($newestMShark) {
    245         my $profileFile = "$resultDirectory/sunspider-profile-$timeString.mshark";
    246         rename $newestMShark, $profileFile or die;
    247         exec "/usr/bin/open", $profileFile;
    248     }
    249 }
    250206
    251207if ($runInstruments) {
  • trunk/Tools/ChangeLog

    r139901 r139902  
     12013-01-16  Eric Seidel  <eric@webkit.org>
     2
     3        Remove --shark* support from sunspider/run-sunspider now that Shark is dead
     4        https://bugs.webkit.org/show_bug.cgi?id=99512
     5
     6        Reviewed by Darin Adler.
     7
     8        * Scripts/run-sunspider:
     9
    1102013-01-16  Eric Seidel  <eric@webkit.org>
    211
  • trunk/Tools/Scripts/run-sunspider

    r110389 r139902  
    3939my $root;
    4040my $testRuns = 10; # This number may be different from what sunspider defaults to (that's OK)
    41 my $runShark = 0;
    42 my $runShark20 = 0;
    43 my $runSharkCache = 0;
    4441my $runInstruments = 0;
    4542my $suite = "";
     
    6057  --runs            Number of times to run tests (default: $testRuns)
    6158  --tests           Only run tests matching provided pattern
    62   --shark           Sample with the Mac OS X "Shark" performance testing tool (implies --runs=1)
    63   --shark20         Like --shark, but with a 20 microsecond sampling interval
    64   --shark-cache     Like --shark, but performs a L2 cache-miss sample instead of time sample
    6559  --instruments     Sample with the Mac OS X "Instruments" tool (Time Profile) (implies --runs=1)
    6660  --suite           Select a specific benchmark suite. The default is sunspider-0.9.1
     
    7468           'runs=i' => \$testRuns,
    7569           'set-baseline' => \$setBaseline,
    76            'shark' => \$runShark,
    77            'shark20' => \$runShark20,
    78            'shark-cache' => \$runSharkCache,
    7970           'instruments' => \$runInstruments,
    8071           'suite=s' => \$suite,
     
    126117# This code could be removed if we chose to pass extra args to sunspider instead of Xcode
    127118push @args, "--set-baseline" if $setBaseline;
    128 push @args, "--shark" if $runShark;
    129 push @args, "--shark20" if $runShark20;
    130 push @args, "--shark-cache" if $runSharkCache;
    131119push @args, "--instruments" if $runInstruments;
    132120push @args, "--suite=${suite}" if $suite;
Note: See TracChangeset for help on using the changeset viewer.